How much does the reputation of the undergrad institution matter in top 10 graduate schools in Mathematics?
Unfortunately, this is not really a trade-off we are qualified to help you with.  There are just too many unquantifiable factors (we don't even know what country you are in!); I generally don't really recommend students putting off the rest of their lives for a year to try something like an entrance exam again.  Even if you can get in, it could be that going A and B will make a big difference, but you can't possibly know that (maybe Chicago had a really bad experience with the last student that came from A; you just can't control this stuff). Who can possibly guess what the general political situation for foreign graduate students in the US will be in a few years?  

So my advice is to start at your current institution, and do the best work you can.  That's what you can control.