Now when going downstream,
distance=25 km
Speed of boat=(x+5)kmph [Given in question]
time taken=distance/speed=25/(x+5) hours
Now the time taken downstream was 10 minutes less than time taken upstream
10 minutes means (10/60)hours=(1/6)hours
This means that time taken taken to go downstream was less
So we get,
(time upstream)-(time downstream)=10 minutes
Taking LCM,
Taking x(x+5) to the other side,
Taking everything to the right hand side we get,
Factoring this quadratic we get,
x=25,-30
Speed cannot be negative
Therefore,x=25 kmph
So speed of the boat upstream was 25kmph
Hope this helps,
Prabhat