The identity $$\sum_{k=0}^{\infty} a^{k} \cos(kx) = \frac{1- a \cos x}{1-2a \cos x + a^{2}} \ , \ |a| <1$$
can be derived by using the fact that $ \displaystyle \sum_{k=0}^{\infty} a^{k} \cos(kx) = \text{Re} \sum_{k=0}^{\infty} (ae^{ix})^{k}$.
But can it be derived without using complex variables?
This has a standard approach: You multiply with the denominator of the right fraction, sort the product with the series on the left by powers of $a$ and apply trigonometric identities to the resulting coefficients of $a^n$. Everything should cancel except the lowest order terms that constitute the numerator of the right side.
One should also note that this is the Poisson kernel of the Abel summation method for Fourier series, see for instance Carl Offner: "A little harmonic analysis" (Online PDF article)