Problem: If then x = ?

According to the solution to the problem

I am having a hard time finding this solution the first thing I do is distribute the y.

Thus then becomes

But that step doesn't seem correct, would someone please guide me through the problem?

Thanks