Controlling a 300V node with 5V from a micro-controller
I'm unsure as to what values R1 and R2 should have


The P channel FET has a maximum gate-source voltage of +/- 20V so currently with resistor values as shown it will get 50V and die. Maybe a safer bet is the put a 12V zener across R2 to restrict this voltage under changing values of R1 - but don't lower R1 below 100k. 100k needs a 1W5 rated package - 300 x 300 / 100k = 0.9W.

I'd also be tempted to put something like 100 ohms in series with the P channel drain to limit current in case you have the 47k load resistor at some distance from that FET.