How would a Minecraft server run on these 2 PC's?
Definitely not. Ram is what matters most for servers, and 512 MB of ram is simply not enough for forge mods.
It may just barely work for 4 people, but it will lag a lot. You're better off buying a cheap desktop from /r/hardwareswap or ebay and running it off there.