Dear Student
During earthquake foundation of buildings screwed up and due to gravitational force of earth they fall down on earth.
Three equation of motions are applicable only for the cases where acceleration is constant.
So if on falling building only acceleration due to gravity is applying then equation of motions are applicable here.
Regards