Thanks both for your help,
I didn't write the English sentence "Petya walked up to the professor and told him that he had to miss the lecture today." it's from the textbook, but I am a native speaker and only one meaning occurred to me, that he was telling the professor ahead of time that he would have to miss the lecture later that day. I can't explain why grammatically, it just makes more sense dramatically.
A couple more problems. Here's a translation:
We came out of the theater, got on a bus, and left for home.
Мы вышли из театра, сели на автобус и уехал домой. (Should I use в or на before автобус?)
I walked into the room, sat down at the table and began to eat.
Я вошёл в комнату, сел за стол и начнал есть. (I'm to sure about начнал here.)
Thanks,
Z