Solution :
The killer lives in house A. A machine gun would have made a lot of noise, and he’s the only one being able to do it while the train passed so no one else heard a thing. Both B & C would have heard something if it happened in any of those houses.