Question: How do I solve this trigonometric equation has the form cos(a) = cos(b)

I am trying to solve the equation: 
solve(cos(3*x - Pi/12) = cos(2*x + Pi/7), x, allsolutions).
It is difficult for me to get the resullt. 
Solve by my hand. I tried
restart;
a := 3*x - Pi/12;
b := 2*x + Pi/7;
S1 := solve(a = 2*Pi*k + b, x);
S2 := solve(a = 2*Pi*k - b, x);
S := ((S1 union S2) assuming k::integer);

I get the answer

Can I get the result by command 
solve(cos(3*x - Pi/12) = cos(2*x + Pi/7), x, allsolutions).

Please Wait...