from the inside. Get a big screwdriver put it under the rubber lip and push the lip up and towards the window, over the edge of the metal lip around the window. Do this all the way around, can be a right pain in the arris to start with.
Then string in the replacement

Thats, get the new window, put the rubber trim all the way around it, get a thick bit of string. Youll notice on the trim it has a big channel running around the inside, put the string in this all the way around starting from the middle of the bottom, being sure to leave about 6 inches of string outside of the trim as you will have to pull on this so the longer the better.
Easiest with another person to give you a hand at this point.
Go back to car, put the end of the string inside the car, push window into gap. If you have another person get them to push the window towards the car from the edges. As you pull the string out, they should push on that bit of window, while holding it in place.
Basically pulling the string will flip the rubber lip inside the car, hardest bit is the angled corner. Obv you can use a screwdriver to flip up missed bits of lip
