Note that 2x+5 and 7x-14 are adjacent to one another on the same straight line. Thus, they must add up to 180 degrees:
2x+5+7x-14=180
9x - 9 = 180, or 9x = 189. Then x = 21, giving 7x-14 the value 147-14, or 133.
Angles P and 7x-14 are the same, so P is also 133 degrees.