On arrival at St Pancras, cross the busy main road in front of the station (Euston Road). Either walk towards to your left and look for bus stop 'R', or towards the right to find bus stop 'B'. (To the best of my knowledge, there's no stop in between those two but look at the signs to check.The route number you're seeking is No 59). Buses run about every 6 minutes, taking roughly half an hour to get to Waterloo.
Then, as suggested above, take the National Rail (overground) service to Hampton Court.
Allow about 1½ hours to get from St Pancras to Hampton Court Palace.
Chris