Really, your vet should have demonstrated this for you when prescribing the medicine. Is there any way you can go back and ask them to do that? It certainly would be easier if you had someone else to hold the snake while you gave the medicine.
I use the cotton swab method as Bruce describes for hatchlings, or for older snakes, I slide the edge of a credit card (or similar) into the mouth and then twist it upwards slightly to open the mouth. In essence, the thing you're using to open the mouth must be blunt, cause minimal risk to teeth, and be easy to manipulate.
If using a syringe, make sure it goes right to the back of the throat before pressing the plunger. The tube that you'll see in the base of the mouth is the windpipe, and you want to be very sure you don't squirt the medicine down that, or you'll choke the snake. Sounds daft, but I did once answer a post from someone who was making that mistake.