Ответ:

He was walking along the river when a boat passed.