The Kompaneets equation is a nonlinear partial differential equation that plays an important role in astrophysics as it describes the spectra of photons in interaction with a rarefied electron gas. In spite of its importance, exact solution to this nonlinear equation are rarely found in literature. In this work, we solve this equation and present a new approach to obtain the solution by means of the combined use of the Adomian decomposition method and the Laplace transform (LADM). Besides, we illustrate our approach solving two examples in which, two initial photon distributions, well known in astrophysics, are given. We compare the behaviour of the solutions obtained with the only exact solutions given in the literature for the non-relativistic case. Our results indicate that LADM is highly accurate and can be considered a very useful and valuable method.