The image is pasted, but won't get drawn until the next
sync command, hence forcing you to go into pause mode to first show the image and then exit it before the image will actually be visible.
Just change it something like so:
if keystate (25)=1 Rem checks to see if "P" key is being pressed
paste image 17,500,600
while keystate(25)
` This is important; otherwise you would very likely keep the
` P key held down long enough to get out of the pause section
` again.
sync
sleep 1
endwhile
while scancode() = 0 ` Exits when no key is held down
sync
endwhile
endif
Hope that helps