Let the velocity of the boat be v km/h and velocity of the current be u km/h.
When the boat goes in still water, its velocity is v=6 km/h.
When the boat goes against the current, its velocity is v-u=(6-u) km/h.
For distance S, time taken in still water to cover the distance = S/6 seconds...