I have no "real" answer, because the river may curve...
Fun answer: farmer Ed clearly does not realize you can Not create a rectangular plot that borders a river unless it is artificial and instead of dirt, it would Need to be concrete to ensure a constant straight edge; although even in that case, it would no longer Be a river! It would be a mote or channel. So this problem is unsolvable at his current standards.