In effect, you failed to understand the reason the student from another class talked to you on your way home.
This, likely happened because the other student failed or didn't adequately inform you about the purpose of such sudden communication, thereby resulting in <u>miscommunication.</u>