Ответ:

He walked along the river when a boat passed.