By the given triangles in the figure, you can notice that the following proportion must be equal, because the involved sides are congruent:
In the left side, side of triangle with length y - b, divided by side with length x, must be equal to the quotient between side with length m + b - b and side with length 1.
Solve the previous equation for y, just as follow: