Very good.There, perhaps, is a shortcut via Bottema's theorem.
On sides AC and BC of right (at C) ΔABC form squares and join the corner opposite to C, say, A' in one square and B' in the other. The midpoint M of A'B' does not depend on the position of C and is the vertex of the right isosceles triangle AMB. You are in a position to apply your lemma right away.