River crossing problem

Question

Hints

Answer