sigh. what an excellent way to spend a student's time...
its trying to teach you that ++p vs p++ are different. its order of operations...
int p = 1;
cout << p++; //writes 1, then increments p to 2.
cout << p; << 2
cout << ++p; //increments, then writes: writes 3
cout << p; still 3
this is coupled with teaching you about pass by reference vs pass by value. By mixing the two concepts they made it difficult to understand either one of them (this is my complaint with this exercise). With the above, can you see how the pass by references vs value are different and that the order of operations from pre/post increments is playing off that to give the values you see?
I can break it down more, but see if you can unravel it first... give it another try.