Duplicate the background layer and enlarge the canvas at the top about 20% (as shown).
Hit Ctrl+T to get a free transform box around the image. Hold Ctrl/Cmd and pull the top left handle
inward until the building is plumb. This might necessitate a slight counter-correction of the top-right
handle, but not nearly as much.
When both sides are plumb, you should grab the top middle handle and stretch the image upward just
a little (because the lateral squeeze "squashes" the perspective a bit). Then crop. You'll lose part of
the image on the left, unless you want to try cloning that back in.
(This is done in Photoshop, of course.)