A projectile is launched from the origin (so close to the Earth that it can be modelled with $a(t)=-g $ with speed $v_0$ at an angle $\theta$ to the (positive) horizontal.
I'm trying to show that, if $R=$range of the projectile, then the Cartesian equation of the trajectory is given by: $y=\frac{4h}{R^2}x(R-x)$.
Here's my working:

As you can see, I'm stuck on the last line and have no idea how to progress, without going in circles.
Could someone tell me whether or I'm going wrong and how to get out of this mess? Thanks
The first expression in the first line after "Substituting this into $(2)$ yields" should be: $$y=x \frac{\sin \theta}{\cos \theta} - \frac{1}{2} g \frac{x^2}{ v_0^2 \cos ^2 \theta} \Rightarrow $$ $$y=x \tan \theta - \frac{1}{2} g \frac{x^2}{ v_0^2 \cos ^2 \theta} \quad(1)$$
Note that two of your expressions (for $h$ and $R$) can be changed to: $$ \tan \theta = \frac{4h}{R} \quad(2)$$ and $$\frac{g}{2v_0^2 \cos ^2 \theta}= \frac{\tan \theta}{R}. \quad(3)$$
Now substitute $(2)$ and $(3)$ in $(1)$ and you will get the desired expression.