A lumberjack (mass = 104 kg) is standing at rest on one end of a floating log (mass = 234 kg) that is also at rest. The lumberjack runs to the other end of the log, attaining a velocity of +3.18 m/s relative to the shore, and then hops onto an identical floating log that is initially at rest. Neglect any friction and resistance between the logs and the water. (b) Determine the velocity of the second log (again relative to the shore) if the lumberjack comes to rest relative to the second log.

I know that it has to do with conservation of momentum, but I have confused myself with the formula and have no idea how to start working it out.