You cannot, did you or the question itself defined the variable p before? like p is an integer or something? If you didn't then define it, if you did, you can either define p+1 as P, where P is also an integer (or whatever you defined it as), you can also use := sign, which means something is defined to be equal to something, where you can do let p := p + 1, which translated as let p defined to be equal to p + 1. To clarify things, you can write next to it (since integer is closed under +, -, x, ÷) this part is not necessary for the actual exam.
I would like to see the full question and the solution to it, because it may not make sense to chuck this in the middle.