He is peeing inside your house when he hears the neighbors dog that is outside and next door behind a fence? Did I get that right. Maybe he just get excited when he hears the dog(s). I'm not a trainer, but it seems to me you need to treat this like a house training exercise. You need to catch him in the act, and immediately walk him outside. Doing it after the fact will not accomplish anything but additional confusion for the dog.