Do any math PhD advisors work on a problem with their student? I am wondering if anyone’s math PhD advisor worked side by side with you on your thesis problem? In other words, instead of meetings consisting of updates of where you are at in your research and just talking about ideas, the meetings consisted of working at the board together on the problem at hand.
If done over the entire course of the PhD, this is a very bad idea for any student interested in a research career.

Of course, it is reasonable for an advisor to work more closely with a student to get him or her started on a project.  It's also reasonable for an advisor to contribute some (but not all) of the key ideas.

If a thesis advisor cannot say in their recommendation letter that a student solved their thesis problem (or some other problem) with not too much help from the advisor, the student is not likely to be hired for a research-oriented postdoc.

Different professors have different standards for co-authorship with their advisees, but generally it is expected that at least one of the papers a mathematics student publishes from their PhD work will not have the advisor as an author.  (It is generally known in the community which professors are more likely to put their names on papers with their advisees.)

To actually answer your question:

Most advisors understand this reality and a good advisor will be reluctant to get too involved in their students' projects, but when they have a student whom they don't see as capable of a research career, they will frequently step up to get the thesis done so that the student can move on to a non-research job in industry or a teaching-oriented job.