Length contraction problem in special relativity

A rod of proper length L0 oriented parallel to the x axis moves with speed u along the x axis in S. What is the length measured by an observer in S'?

2. Relevant equations

Relativistic relative velocity:
For an object moving with speed u in S, its speed u' in S' = (u - v)/(1 - (u*v)/(c^2)) where v is the speed of S' relative to S.

Lorentz transformations:
x' = γ(x - vt)
t' = γ(t - xv/(c^2))

3. The attempt at a solution

The answer to the problem is given, but I think it's been heavily algebraically manipulated and I'm not sure if the answer I got matches. I want to check if the way I did it makes sense:

Consider two events in S: when the right end of the rod crosses the y-axis and when the left end of the rod crosses the y-axis. Looking at the x and t coordinates only (since the rod's movement is parallel to the x-axis)
event #1: (x,t) = (0,0)
event #2: (x,t) = (0, L0/u)

These answers could potentially match up, but I couldn't get them to using algebraic manipulations, but I might just not know how they manipulated it/not know some trick they used. Does the way I solved the problem make sense, though?

I don't think you've done it correctly. To start with, lets say that in reference frame s, the rod is length L This will not be the same as L0, because the rod is moving with respect to reference frame s.

So if we consider the two events. One when the right end crosses the y-axis, and the other when the left end of the rod crosses the y axis, we actually have:
event #1: (x,t) = (0,0)
event #2: (x,t) = (0,L/u)

And we know that L[itex]\gamma[/itex]=L0, so this means your calculation will have gone wrong from here.

By the way, its a pretty difficult problem, having to think about all the different reference frames.

So I thought about this a lot and realized one key thing: there are two γ's in the scenario, one for u and one for v. The γ in L = L0/γ uses u (as in 1/sqrt(1 - u^2/c^2)) while the Lorentz transformation equation's γ uses v (as in 1/sqrt(1 - v^2/c^2)).

While this does seem closer to the given answer, I'm still not sure if the process is completely right..or if it is, how to algebraically manipulate what I have above into the given answer. This is particularly because of the (u-v) term in the numerator and because the (c^2 - v^2) term is in the denominator rather than the numerator...Any ideas?

Just to add, I tried bringing the (u-v) term as (u-v)^2 into the square root and also bringing the 1/u as 1/u^2 into the square root but it doesn't really...appear to be helping :*(

I don't think your answer is correct, because if you put in u=0, the length tends to infinity, and with v=0, the length is different to what it should be.

I haven't gone through your working yet, so I'm not sure where you might have gone wrong. It's an interesting way of finding the length, but I think a simpler way is to find the speed of the object in the S' frame of reference, and then just use the usual length contraction formula, where gamma uses this speed.