By Walk or By Walking on foot by foot

100% wrong, both of them. It’s time to change your habit.

I went to school on/by foot.
I walked to school.