Respuesta :

The proper sentence should be

I saw the principal as I walked past the library.

The sentence is worded as if its past tense, where the term walk was still left in present tense. Adding -ed shows that its past tense.