Distance = (Rate)(Time). So, Time = Distance/(Rate)
Let x = speed of boat in still water
y = speed of current
Then, 30 / (x-y) + 28 / (x+y) = 7
21 / (x-y) + 21 / (x+y) = 5
Multiply the first equation by 3 and the second equation by -4:
90/(x-y) + 84/(x+y) = 21
-84/(x-y) - 84/(x+y) = -20
Add the equations to get 6/(x-y) = 1. So, x-y = 6.
Since x-y = 6 and 30/(x-y) + 28/(x+y) = 7, we have: 30/6 + 28/(x+y) = 7
28/(x+y) = 2
x+y = 14
So, we have the system: x - y = 6
x + y = 14
Add the equations to obtain 2x = 20
So, x = 10 km/hr and y = 4 km/hr