Disclaimer: My answer rather aims at underlining that judging which Professor is the best for you depends on your long-term objectives.
You might want to choose your supervisor for two reasons. They sometimes do not align (i.e., it's either-or).
- Choosing a Professor for during the PhD: You might want to choose a good supervisor for the time you are PhD student. In such case, you are looking for someone who has already supervised PhD, has time, has research focuses aligning with your research topic/motivations, etc. This will ensure you have a "nice time" during your PhD, with enough support and guidance. Talking with former PhD students might help. Note that in this case, the institution (in terms of courses, funding, support, etc.) matters too.
- Choosing a Professor for after the PhD: However, sometimes, what you focus on is the next step. It may vary from one field to the other (I don't know about math at all), but I know first-hand that sometimes, what matter the most for getting the position is recommendation letters (more precisely, who wrote them). Having the right (meaning "well established and acknowledged, with large network) connexions helps you getting visiting PhD/PostDoc positions more easily. Don't get me wrong: you won't get those positions if you are not doing good research. However, when you have reached a certain "enough good" level (except in some rare case where you're extraordinarily brilliant), my opinion is that the quality of your work matters less than who recommends you — for junior researcher position, at least. So in such case, working with a Professor that has an above-average impact factor, published in renowned journals, and, most importantly, have "sent" PhD students in prestigious institutions (what they — the Professor — can easily do because their best buddy is PI there) and "landed" former students in cool positions is what you are looking for. Even if they might be less good mentors during the PhD. So track where are currently working their former students.
In both cases, look for a Professor that is interested in what you are doing.
Remember also that it's just like houses or spouses: there is no such thing as a ideal positions. You want to find the best "good-enough PI" that would accept you, even if they are not perfect in some aspects.
Finally, please consider that you are choosing a position that will significantly impact your life for the next 3–6 years. Don't neglect your personal needs/requirements (a very good position is not worth anything — in my opinion).