Does a post doc at a prestigious university make up for doing a PhD at a lesser ranked university for Mathematics? I think I understand that someone should do a Ph.D. under a strong advisor and have a solid publication record, and I know going to a more prestigious university helps. Now, this is where I get confused. Let's say person A goes to Princeton and person B goes to Iowa State, for example. Let's say person A gets a post-doc at Michigan and person B also gets a post-doc at Michigan. Do people A and B both have an equal chance of getting a tenure track position at for example the University of Oklahoma? I guess what I'm asking is that if someone gets a post-doc at a prestigious university, does it make up for the prestige of where they got their Ph.D.?

The university I'm going to do my Ph.D. in has a nontrivial amount of people that get postdocs at prestigious universities but none of them end up as tenure track professors at universities with a graduate program.
A very small number of people ended up at R1 universities past 1990, perhaps several people at my university.

Some famous counterexamples to this are Igor Rodnianski, Aaron Brown, and Ernest S. Croot.

DISCLAIMER: I'm not interested in going on to be a tenure track professor, just curious.
Actually, what is better is what you do in whatever circumstances you end up in. If you are productive and publish good research, the institution at which you do it is of little importance. But any institution at which you can find good collaboration resources, such as weekly seminars in field, are valuable. Larger places which larger faculties tend to have these. But even quite small institutions manage it. 

One of the reasons that few people are winding up with tenure track positions at R1 universities is that the number of total positions offered in a given year is small compared to the number of potential candidates. So, the competition is fierce, but it doesn't consist of ranking the candidates in the order of the prestige of their institutions. 

Go where you will find people with similar interests and who are willing to work with you. Write a lot of good papers. Build an expanding circle of collaboration. The very best faculties are not, in fact, concentrated at only the very most prestigious universities. 

Note also that doing mathematics alone without any feedback or synergy is very difficult. So, a group of like minds is very valuable. It is possible to wind up at a prestigious place where there is actually no one to give you any support. It will be difficult to advance from such a situation.