Decompose the initial velocity into its horizontal and vertical components $(u_H, u_V)=(u \cos \theta, u \sin \theta)$. The ball reaches the top of the parabola exactly when the vertical component of velocity is $0$.
At that point, energy is
$$mgh = \frac{1}{2} m u_H^2$$
since $u_H$ is constant. So you get that the ball meets the plane at a height $h= \frac{u_H^2}{2g}$.
Once you find the time $T$ in which the ball meets the plane, you can conclude that
$$\sin \phi = \frac{h}{Tu_H}$$
which gives you the relation between $\theta$ and $\phi$.
This time can be found with the formula
$$h = u_V T-\frac{1}{2}gT^2$$
so that
$$T=\frac{1}{g} (u_V - \sqrt{u_V^2 - 8gh}) = \frac{1}{g} (u_V - \sqrt{u_V^2 - 4u_H^2})$$
hence
$$\sin \phi = \frac{1}{u \cos \theta}\frac{h}{T}= \frac{1}{u \cos \theta} (u\sin \theta - \frac{1}{2}g T) =$$
$$= \frac{\sqrt{\sin^2 \theta - 4 \cos^2 \theta}}{\cos \theta}$$