The simplest way to get the IP address is from the command prompt Start - Run - cmd by typing in ipconfig. If you need more info, type in ipconfig /all.
Both PCs need to be in the same subnet, in other words, only the last part of the four part IP address can be different: Example:
192.168.1.2
192.168.1.5
The subnet mask must be 255.255.255.0.
The Default Gateway must be in the same subnet.
You can also get the same info from Control Panel - Network Connections, then right click the Local Area Connection, select Status, click the tab Support and then Details (much more complicated, isn't it).
From the command prompt you can ping by typing in ping followed by the IP address of the other PC. If you want ping 20 times instead of 4 times, you type in (IP address just an example)
ping 192.168.1.3 -n 20
By the way, which version of Windows are you using on each of the two computers? XP Professional or XP Home?
Are you by any chance running something like Norton Internet Security on the PC to which the printer is connected?
Here is Microsoft's suggestion how to fix a similar problem by making sure the Guest account is turned on in the computer that the printer is connected to:
http://support.microsoft.com/kb/915107