The total time taken to reach the point again at the same height is 4 s, so the time to reach the highest point is 2 s.
At the highest point, velocity becomes zero. So using $v = u - gt$:
$0 = u - 10 \times 2$
$\Rightarrow u = 20~\text{m/s}$
But this would only be valid if the height in question were the maximum height.
Now use displacement equation between two positions:
Let $t_1$ and $t_2$ be the times when the ball is at 25 m: $t_2 - t_1 = 4~\text{s}$
Let $t$ be time taken to reach 25 m during upward motion. Then it will take $t + 4$ to again reach 25 m during downward motion.
Using equation of motion: $s = ut - \frac{1}{2}gt^2$
So for $s = 25$ m: $25 = ut - 5t^2$ \quad (1)
and $25 = u(t + 4) - 5(t + 4)^2$ \quad (2)
Substituting and solving (1) and (2) gives $u = 30~\text{m/s}$