let's recall that d = rt, namely distance = rate * time.
d = distance from one pier to another
c = speed of the current
b = speed of the boat
now, let's notice something, on the way over the boat travelled "d" kilometers in 4 hrs, and back the same "d" kilometers in 5 hours.
when going with the current, the boat is not really going at "b" km/s, is really going faster, at "b + c" km/s, because the current is adding to it.
now, when going against the current, the boat is not really going "b" fast, is really going slower, at "b - c", because the current is subtracting from it.
from the above, we can conclude that the 4hrs trip was with the current, since it took less time, and the 5hrs trip was against the current, and we also know that the boat does 70 km with the current in 3.5 hrs, ok hmmm let's put all that in a table.