What a strange place to get stuck. That was a lot of work to have it fall apart at the end.
Read the problem statement. "To what point should he row "
Read your definition: "x = distance between the point directly across on the opposite bank and the point where he needs to row."
It may have helped if you had included one more explanatory note to your defintiion section.
1-x = Distance he will walk. You have that in your formulation and solution, but you didn't say it explicitly.