Only if your goal is to teach people how to solve that particular problem. But it’s not the best way to teach mathematics.
For my money, the best way is problem based. I heard of one math teacher who had a video playing as the students walked in. The video was a weirdly shaped bucket being slowly filled by a hose. Students came in, saw him sitting up the back, got fidgety then someone asked “how long will this take??”. At that, he shot up and said “good question”! And they spent the rest of the class trying to estimate how long it would take for the bucket to be filled. Complete with diversions into flow rate, volume, and so on. He made the students ask the question. Then got the students to try and answer it themselves, helping them work through their own ideas on the board.
That’s beautiful teaching.
It is the highest level of learning, but still a level of learning.