Import your shot and the image you want to corner pin into AE and drag your shot and your graphic to the timeline.
1. Click the layer you want to track and Animation > Track Motion.
2. Switch the Track Type to Perspective corner pin.
3. Move the tracking markers to the thing you want to track. Make your search squares wide if the thing is moving fast in one direction.
4. Analyze forward. For the bus shot, you need to do it every frame and fix the points when they move off. Sometimes you have to do this. Your results will be better if you always do this. It takes a bit more time but it's worth it in the end.
5. Be sure the image is the target of the motion and click the Apply button.
6. The bus has a lot of motion blur. So add Blur > Directional Blur to the image and adjust it to make the image blend in.