Why does my ex do this?

My ex boyfriend broke up with me 3 months ago and I haven't moved on since then.
A month ago, we became friends again but we don't talk daily.
He'd flirt with me sometimes and on the other hand he'd tease me by being rude.
He's acting hot and cold.
We've been together for like 2 years, and he loved me really deeply!
The reason he broke up with me was because of the way I treat him when I'm mad besides he's stressed because it's his senior year and he need to focus on his studies to get high score.
So does anyone think he'd get back to me after he finishes his senior year, and what's the explanation of the "hot and cold acting" ?
Why does my ex do this?
Add Opinion