If you only look at the first quadrant of the unit circle, something you will notice is that starting from 45degree, if you move x distance away from 45, both clockwise and counterclockwise, you end up two points such that the x1 = y2, and y1 = x2, meaning that cosA = sinA. (you can easily see on 60 and 30, they both 15 degree away from 45)
Apply this to the question, meaning that you are looking for two angles such that 45 is at the middle. This leaves x = 22.