Ok! Here's an explanation and the answer:
The lines clearly make a right angle, as shown by the little square at the corner. A right angle is 90 degrees. 
So we see angles 2 and 1. They make up the entire 90 degree angle. 
So, you just have to add angles two and one to make 90 degrees. 
(a1 = angle 1, and a2 = angle 2)
a1 + a2 = 90 (because of 90 degrees)
Let's replace the values with the ones given. 
a1 = 3x and a2 = x + 22. 
3x + x + 22 = 90. 
The first thing to do is to get rid of the 22 so we only have values with x in it on the left. 
Subtract 22 from both sides. 
3x + x + 22 - 22 = 90 - 22. 
Simplify. 
3x + x = 68
Now we only have x values on the left. We can add them. 
3x + x = 4x. 
4x = 68. 
Now, we only want x. No 4, just x. That way we can find the value x. 
Divide each side by four to do this. 
x = 68/4
x = 17. 
Now, plug in 17 to the original values for a1 and a2. 
a1 = 3x. 
We know x is 17, so a1 is 3 * 17. 
3 * 17 = 51. 
a1 = 51. 
a2 = x + 22
Plug in 17 there. 
a2 = 17 + 22
a2 = 39. 
In conclusion: 
a1 = 51
a2 = 39
Hope this helped!