Suppose a ball is launched at time $t=0$ starting at $x=0$ and $y=y_0$ with initial velocisty $v_{0,x}$ and $v_{0,y}$. Then, after a time $t$, the $y$-coordinate of the ball will be (assuming constant gravitational force)
$$
y=-1/2gt^2+v_{0,y}t+y_0,
$$
where $g$ is the (magnitude) of the acceleration due to gravity at the surface of the earth. We are interested when the ball lands on the ground, that is, when $y=0$. Setting $y=0$ into the above equation and solving for $t$, we find
$$
t=\frac{1}{g}\left( v_{0,y}+\sqrt{v_{0,y}^2+2gy_0}\right)
$$
is the only positive root of the resulting equation. On the other hand, after a time $t$, the $x$-cooridnate of the ball will be
$$
x=v_{0,x}t.
$$
Thus, to find the $x$-coordinate when the ball hits the ground, we need to merely plug in our result from above. We obtain
$$
x=\frac{v_{0,x}}{g}\left( v_{0,y}+\sqrt{v_{0,y}^2+2gy_0}\right) .
$$
At the peak of the bounce, the $y$-coordinate will not be changing, that is $y'(t)=0$, which give us the following equation:
$$
0=-gt+v_{0,y}.
$$
Solving for $t$ yields:
$$
t=v_{0,y}/g.
$$
To find the height of the ball at this time we just plug this $t$ value into $y(t)$:
$$
y=\frac{-v_{0,y}^2}{2g}+\frac{v_{0,y}^2}{g}=\frac{v_{0,y}^2}{2g}.
$$
Of course, under the assumption that the ball loses no energy after the first bounce, this will also be the height of the ball at the second peak.