If you specifically want to have the same set of files running on your own local servers you can broadcast your localhost through a secure tunnel which the second developer can connect into.
You can also develop inside a Dropbox folder on your local machine and share the folder. I've seen this a lot. Here's an example of how this it's done: https://www.youtube.com/watch?v=Irq-uJA-aaA.
The most preferred way to collaborate with another developer and work on a project simultaneously, is to use a distributed version control system like Git/GitHub. I'd recommend looking into that.