The Pathfinder from that era is a unibody vehicle, which means it has no separate frame. The body provides much of the structure. It looks like in this case, the whole body was tweaked a little bit, which isn't allowing the rear door or hatch to close. I'd take it to a body shop and have an estimate done, either by yourself or through your insurance. It sounds like it'll be a big bill either way.
