|Two internal phone lines. Neighbors phone line. I don't see the relationship or how it pertains to the question.|
guapo is correct that you normally need a phone system to do as you desire with two phone lines.
You may be able to find software on the web that you can load on a pc with two modems which the phone lines connect to. This would be a mini PBX.
Try googling "phone server software".