Misaki was a teacher before he passed away in an accident at the stairs. He had met Yako previously when she was younger, often teaching her how to read, write, and use the abacus.
(Source: Hanako-kun Wiki)