Mmm, there must be sure way to work out what XP shall use before actually buying more ram. This cannot be a random that no one can explain?
There is a way, but it's complex - and the available RAM will "look" random, as each PC setup is different (even with the slightest differences), and what you see available is also dependent on the hardware you have, the BIOS setup, and what resources you or the system allocate.
XP SP2 32-bit uses approx. 0.5GB on boot/startup, so effectively, the maximum amount of available RAM is reduced to around 3.5GB immediately. The 32-bit environment and hardware will not let you see the full 4GB, but the 64-bit hardware would, even if running a 32-bit version of XP - it's all about the allocations and the hardware needs.
If you set your AGP Aperture allocation in the BIOS at 512MB or 256MB, the available RAM would reduce, dependent on the setup and allocation of other resources on your system. So the hardware configuration also plays a role.
In the BIOS, you would also need to enable the 4GB Memory Hole option, otherwise the system would probably not boot, or would give you a very low available RAM (i.e. 2 sticks only), again depending on the hardware setup.
From my endless testing, reboot, test, reboot, test, years ago with 4GB, 64-bit hardware and 32-bit XP, I tried many different settings, tweaking the BIOS, then the allocations, then the boot sequences and the hardware, just to see what allocates where, and I eventually gave up and accepted that if I have 4GB installed, the system would allocate the necessary resources accordingly - I found that by increasing my AGP Aperture value in the BIOS to 512MB, I had more available memory showing in the System Properties at the end of the day...
... in a nutshell, I'm happy with the settings now and have never tried to fiddle further with them, as they seem to work fine for me. If you want to "see" 4GB in the System Properties, then install a 64-bit OS, otherwise, you'll just have to live with 2.75GB to 3.5GB...
