Given, $\vec{u}=\hat{i}+2\hat{j}=u_{x}\,\hat{i}+u_{y}\,\hat{j}$
Then $u_{x} = 1 = ucos\theta$
and $u_{y} = 2 = usin\theta$
$\therefore \quad tan\,\theta=\frac{usin\theta}{ucos\theta}=\frac{2}{1}=2$
The equation of trajectory of a projectile motion is
$y=x\,tan\,\theta-\frac{gx^{2}}{2u^{2}\,cos^{2}\,\theta}=x\,tan\,\theta-\frac{gx^{2}}{2\left(ucos\,\theta\right)^{2}}$
$\therefore \quad y=x\times2-\frac{10\times x^{2}}{2\left(1\right)^{2}}=2x-5x^{2}$