I had a math teacher do something similar. He recognized that I was avoiding things by hanging out in his classroom. He decided that if I was going to stay in a maths room, I "clearly wanted to learn more maths" so he taught me more maths. And I soaked up as much as I could and it set me on a path as well. I'm thankful I had 3 teachers that took time and provided me that little extra that lasts a lifetime