Focus on the triangle. One angle measures 31+x, the bottom right measures 45 (it is supplementary to a 135 angle). The bottom left measures x+12 because it is opposite to the x+12 angle. The sum of interior angles of a triangle must be 180, so we have

Angle y is supplementary with the x+12 angle, so we have

Finally, angle x+12 measures 46+12=58