This is a bit complex to detail in one post so I to lead you in the right direction what you want to do is have the camera get the X on the players position and add +[num] to that X and set the position of the camera to that X to get it positioned in the middle.
The smooth switch from left to right can be down with a Smooth Lerp action so that when it moves over to the other side the camera lerps to that new position. So, study lerps and the action advanced lerp because that is the key to getting these smooth positions.
GLHF!