A linear pair are two angles that together form a straight line.
Knowing that a straight line has an angle of 180º, we can add the measures of the angles to get 180º.
measure of angle P + measure of angle Q = 180
6x+1 + 2x-5 = 180
Can you take it from there?