Similarity
Many people place religion and science on the opposite ends of the spectrum, but Frazer is trying to explain that that is an incorrect assumption. Saying that both are from similar origin - the human mind - he wants to spread the idea that both are just excuses or justifications for what we cannot explain. Coming up with the idea for this book by studying a painting, similarity seems to be an important thing, as the book wants to portray the idea that many of the thoughts in our minds our similar in origin and explanation.
Difference
It is rare for a book to have themes that are completely different, but that's the point, difference is important too. Explaining how different times and states of mind have shaped our beliefs, Frazer makes the point that our thoughts are ever-progressing, each generation having slightly different views from the last. This is, Frazer explains, how things should work, and is essential for the evolution of the species.