As I paddle downstream, the current adds to my speed. As I paddle upstream, the current subtracts from my speed. If I paddle 5 km/h upstream in a 5 km/h current, I sit still, but I go 10 km/h downstream.
d = rt and the distances are the same.
5(r + 2) = 7(r - 2)
5r + 10 = 7r - 14
-2r = -24
r = 12 km/h