a particle is projected inside a tunnel which is 8 m high with initial speed u. show that the max range inside the tunnel is 8[√ {(u^2 -16g)/g}]

so I got t=usina/g

sina=√(16g/u^2)

I then tried to sub this into distance in the x/horizontal direction but I could not rearrange it to get the right answer