If there were no current the man would simply swim straight across perpendicular to the bank so as to cross the river in minimum time. But the river is flowing at a rate of 4.5kph. The man must therefore swim into the current at such an angle that the current will actually push him so that he still ends up at the point on the bank directly opposite to the one he swims from. We have a right-angled triangle of velocities, where the hypotenuse represents the swimming speed of 6kph and one of the other sides represents the speed of the current, parallel to the banks. The third side represents the speed in the water directed perpendicularly to the opposite bank. By Pythagors we know that the third side has a magnitude (speed) of sqrt(6^2-4.5^2)=3.97kph. The angle, H, (heading) is given by 4.5/6=3/4=0.75=cos(H). From this we get 41.41 degrees to the bank against the current. So the man's swimming speed is 3.97kph and the direction is 41.41 degrees to the bank. In other words, the component of the man's swimming velocity exactly counteracts the water current.