Well, regardless of what your user input is, your program invokes undefined behavior. On line 5 you are incrementing the pa pointer, and then dereferencing it. But there is no guarantee that the pa pointer now points to valid memory.
OK. The address of a is 1FF994 and the address of b is 1ff998. b has the value 2 and a has the value 31 (scanf is b then a, not a then b as might be expected!).
pa is incremented so is now 1ff998. This is the address of b. *(1ff998) is the value of b so c is now 2.
pb is 1ff998 so *1ff998 is 2. So d is 2 + 1 which is 3
The final output 'lies' as a is not 3, but is still 2. *pa is 3 as pa is now the same as pb.
This all assumes that &b has a higher address than &a - but is probably true for some compilers/systems but shouldn't be assumed.
But notice that the address of c is 1ff990 - which is the address before that of a!
So the memory layout is:
1ff980 - pa (64 bits as compiled as 64 bit)
1ff988 - pb (64 bits)
1ff990 - c (32 bits)
1ff994 - a (32 bits)
1ff998 - b (32 bits)
1ff99c - d (32 bits)
These do not correspond to the order of definition! So really, no assumption should be made about any memory ordering of variables!