Best way to implement something like this is to add a new Object Sprite to act as camera tracker so you center the camera on that tracker and set the tracker position distance between the two players depending on your needs so then
Check if p1 and p2 and tracker distances is > or < xxx do stuff… apply zoom or move the camera with lerp or whatever you want to do.