Can I replace the word to with from in the following sentence: Laura often lost her homework on the way to school.

Yes. But it changes the meaning. She's on the way to school in the morning. She's on the way from school in the afternoon.