Keep multiple players in view of the camera

My problem is im trying replicate i camera such as the game Super Smash Bros.

Im not the best at math, and cant think of way to zoom in and out the camera to keep all players

what I did was use the greatest distance between 2 of the players as my zoom distance (my game is a top down so the zoom was the h component). however, I’ve heard using the cross product of those positions would work, but i haven’t tried. I’m actually still fine tuning mine and am not satisfied yet because I want the the players to be squared relative to the camera’s perspective… Does anyone have any suggestions?