First we need to find the x and y components of the initial velocity
In the x direction the acceleration is zero so we can find how long it takes to go a distance d
In the y direction, the projectile undergoes an acceleration -g and does a displacement of zero because it lands at the same height it was launched from. In the third equation below we substitute the value for t we got above and then do some pretty serious trig to solve for d and simplify.
The time it takes for the projectile to get to its maximum height is half the time it takes to get to d because of the symmetry of projectile motion. We take the time we got at the top and replace what we got for d and then do some more simplification.
Now we plug in this value for t in the equation of motion for the y direction