I have a masters degree in Physics and I have worked in Italian high school for 15 years. Now I'm 47 and I wish to have a bachelor or masters degree in Math, because I'd like to change job. How difficult might be for me to have a Phd after the degrees, considered my advanced age (even if I don't feel it)?
I'll give an answer which is specific for the PhD in Italy. In other countries, things can be/are different.
Now i'm 47 and i wish to have a bachelor or masters degree in Math
If you want to apply for a PhD in Italy, you should have a Master's degree. Since you have already an MSc in Physics, you can probably stop to a BSc in Math, but I suspect that this would strongly limit your chances of being accepted for a PhD in Math.
How difficult might be for me to have a Phd after the degrees, considered my advanced age?
In principle, no more difficult than if you were 20. In practice, it depends on several factors.
I want to highlight one practical factor: Do you plan to drop your current (or another) job during the PhD or do you plan to pursue the PhD while employed? In the first case, you would have to cope with the fact that you should get a scholarship and that PhD's scholarships in Italy are around EUR 1000/month [*], which is probably difficult to accept when one is about 50 years old with 15-20 years of work experience. In the second case, it might be difficult to find an advisor willing to accept you as his student, considering that you would not be able to work full time on your PhD. Moreover, it would be difficult for you to follow the mandatory courses which are requested by some universities.
[*] Currently, they can vary (free of taxes) from about 1100 €/month to about 1500 €/month (rare).
It doesn't get easier as you get older, but neither does age make it impossible or even difficult. What is needed is the self-discipline to do the work. I was nine years older than you are when I started the Ph.D.
The important thing to remember is that the Ph.D. is training for research. In the United States, at least, the work of the Ph.D. student is very different from the work of the undergraduate or even the master's student. Substantial independent work of high quality will be expected of you.