Aside from what joan has mentioned in regards to your servos, based on the code you have the code is running properly.
Lets take a second and breakdown the code so you can understand what is going on.
1 import RPi.GPIO as G # This simply imports RPi.GPIO with an alias of G
2 G.setmode(G.BOARD) # This sets the Pin numbers to how they are physically on the board
3 G.setup(5, G.OUT) # Sets Pin 5 as an output
4 p = G.PWM(5, 60) # Sets Pin 5 as a Software PWM at 60hz
5 p.start(7) # Sets the PWM duty cycle to 7
6 p.ChangeDutyCycle(50) # Sets the PWM duty cycle to 50
7 p.stop() # Stops the PWM
8 G.cleanup() # Cleans up the pins and clearing the registers
Between line 6 and 7 there is no delay or pause so what will happen is that as soon as you make the servo begin to move, the script will then begin to make it stop.
A simple way to test this is simply add the following to the beginning of your script
then add the line between lines 6 and 7:
This, when run will have your servo run for around 5 seconds then stop.