I don't think it was ever stated fully, but it really looks like Mahiro didn't pass his exams the first time around; presumably that's part of what sent him into the depressive spiral that had him in the in-home security guard life from the start of the series.