Well, the greatest range is achieved on level ground when a projectile is fired at an angle of 45 degrees with the horizontal.

I don't know if you're supposed to know the range formula,. So, I'll use the long way.

Let the muzzle velocity be v.

Along the horizontal, you have a component

Along the vertical, you have a component

The time for the projectile to land is obtained using the vertical component:

s = 0,

u = v cos(45)

t = ?

a = -9.8

From this, you get an equation with v and t.

The next part is when taking the horizontal component.

In time t, it covers distance d.

d = 25 km = 25000 m

u = v sin(45)

t = ?

This gives you another equation with v and t.

Solve simultaneously to get the value of v.