A trick I often use with these sorts of problems is this. Let $A = P+Q$ and $B=P-Q$, so that we want to show that $Q=0$.
$A+B+C = 180 \Rightarrow C = 180 - (A+B) = 180 - 2P$. The condition becomes $$\cos(P+Q)+\cos(P-Q)+\cos(180°-2P) = \frac{3}{2}$$
Using standard trig identities yields
$$2\cos(P)\cos(Q)-2\cos^2(P)+1 = \frac{3}{2}$$
$$\Rightarrow 4\cos^2(P) - 4\cos(Q)\cos(P) + 1 = 0$$
This is a quadratic in $\cos(P)$, and since it must have real solutions, its discriminant must be $\ge 0$. Hence,
$$16\cos^2(Q)-16 \ge 0$$
$ \Rightarrow \cos^2(Q) \ge 1$ $ \Rightarrow \cos^2(Q) = 1$ $ \Rightarrow \cos(Q) = \pm1$ $\Rightarrow Q = 0 $ or $180$. However, $A-B = 2Q$, and since $A$ and $B$ cannot differ by $360$, $Q$ must be $0$ $\Rightarrow A=B$.
Now, if we swap $B$ with $C$ and repeat the process we will get $A=C$.
Hence, $A=B=C$, and the triangle is equilateral.