Use linear pairs to find the measure of angle B and the measure of the angle adjacent to the measured angle 135. Use the vertical angle theorem to find that angle inside the triangle across from B. Then use the triangle angle sum theorem to add up your values to equal 180. Solve for x and then plug that value back into 31 +x.