If it's just 2 players you can start by keeping the camera centered on the mid point between players. Now you have to move the camera forward/backwards to keep them in view. You could measure the distance between players and use that to set the desired distance of the camera. This could be a simple multiplier, or you could create a relationship using Sample Curve - basically defining the desired camera distance for any given separation of the players. This makes it easy to enforce min/max distance, easing in/out etc.
Once you've calculated the desired position of the camera, you should smoothly move the camera towards that position every frame, instead of just setting the position. This should give you a looser more natural camera.
Does that make sense? Drawing a top down diagram will help visualize the setup...