How to prove $cos(t) + cos(\pi t)$ is non periodic function? Also can I represent this signal using fourier series?
$cos(t)$ and $cos(\pi t)$ are both periodic with periods $2\pi$ and $2$ respectively. To find the period of the sum we need to find an integers $n,m$ such that $\pi n = 2 m$ or $\pi / 2 = m /n $, which is not possible since $\pi$ is irrational.

I think the Fourier series uses specific frequencies to form the signal. You can't necessarily put a frequency component at irrational frequencies.

Fourier series work fine with irrational frequencies too, but the frequencies are all harmonics, that is, integer multiples, of the fundamental frequency.