Depends on where you delineate the beginning of a particular species. Evolution is a continuum and both have ancient ancestors - maybe equally ancient. Yes, we know some form of cat was woshipped by Egyptians but you also have the dog star and Anubis who are derived from dogs.
They may have evolved together. Large ice age wolves & saber tooth cats existed at the same time. Before that, not sure. But logically, considering how equally close the two species have developed, guessing they've been racing ahead, neck & neck, as top predators for as long as animal life has existed.
Dogs are MUCH older than cats. In fact dogs have been with us as long as we can remember, but cats were domesticated from the african wild cat around 4,000 years ago approx. This is also based on if you are talking about Felis Domesticus, and not cats in general