Cats do have some sort of "homing behaviour", but not as much as pigeons.
Unlike humans, cats use smells and sounds more than their vision. So, if they get attracted to familiar noises it might help them to find their home, even though they are far away. However, this type of behaviour has certain limits.
One time, after I brought my cat from the vet, I left him only 50 meters from his regular patrol and went to work. Apparently, the stress of the vet coupled with the stress of abandonment so he hid under a staircase and didn't move at all for several hours. When they are stressed, even 50 meters might be too far for them to get back to track.
The same cat, however, found his way back to his old garden, in a couple of weeks after I moved him 1.5 km. He probably noticed something familiar while he was carving himself a new territory and followed his instincts. I received a text from my old neighbours saying my cat is with them and when I went to pick him up, he was already gone and returned to me all by himself. So, when they have the time and when they are not stressed, 1.5 km might be a manageable distance.
To sum up, I do not believe a cat can return 2 km all by himself after being dumped. If he is fed and looked after by someone else, when he is calm, he might find a cue to help him back to his old turf.
To address the reason of abandonment, in most countries cats have a right to roam, meaning that they can't trespass. As a result, owners are not liable to any damages the cat might cause because such damages are no different than damages caused by wind or a bird. So, you don't have to solve your neighbour's problem with your cat. He, on the other hand, might have taken actions to prevent your cat from getting into his yard. There are many methods to deter a cat from getting into your garden without harming the cat. This answer explains them for a specific setting.
I hope this helps.