I've had that situation before. Misjudged the upper weight of a tree, and on the side of a hill, so it fell into the tree next to it, instead of away from it. Then cut it again and it jumped off the stump and sat in the dirt. Here's how I got it out. Not recommending you do it, but its what I did....
I made another notch on the side opposite of the tree its leaning against. Then did the back-cut on the side by the tree its leaning against. That made the leaner collapse towards the tree its leaning against. It jumped down into the dirt again, but the butt end was now a couple feet closer to the base of the tree its leaning against. Had to repeat that process 2-3 times before the leaner finally fell away from the tree it was leaning against.
But each situation is different.
Good luck and watch out for falling branches if you are working under that thing. Wear a hard hat.