I don't know which engine you use to make that game but here is the simple step you can try :
- Check the distance between the player and the boss
- If the distance is lower than 30 (or something else) do the following :
- Compute the point (x, y) in a middle of the vector player-boss (made with position (x, y) of both)
- Set the position of the camera to that point.
This will give you an idea of what it can looks like :)
Hope I was clear enough.
Cheers !