It's hard to tell from the pics what all has moved. And I don't remember what is behind/backing the spare tire hinge. I think I would pull that off, and address the pull inboard first, then address the spare tire hinge area.
Can you get a threaded plate behind the bent tailgate hinge holes, and thread two bolts in there, and pull inboard on those bolts? I hope that makes sense.
Be careful not to pull the pieces apart.
Or possibly pull on the bolt for the spare tire hinge both back and inboard at the same time. Don't actually use the bolt that is there, use something new/longer. Make sure it does not twist or it may cause more damage on the quarter around the side.
Take your time, it seems like a pulling scenario, not a hammering scenario.