Let
s be the speed of the ship, and
c be the speed of the current.
We know that distance equals speed multiplied by the time.
With the current

or

This is our first equation.
Now, against the current, we have

or

This is our second equation.
We solve the equations simultaneously, by adding them together

Substitute s=87.5 to the first equation to solve for c.

The speed of the ship is 87.5 km/hr and the speed of the current is 17.5 km/hr.