hope I can be of some help. I watched the game last night too, it was great. Spurs were really dominant the first half.
Anyways, your initial calculation is correct. Finding the amount of time Miami has the ball is a simple subtraction of 60mins-SpursPossessionTime for the entire game. However, this doesn't give any insight to help with plays. Maybe using smaller intervals, like each quarter is a better start.
For your other question on modelling things with multiple variables, Linear Regression is your answer. This is a modelling technique in which you choose what variables you want to include, to try and match your existing data.
So for example, say I have a list of scores for the entire Miami heat season. I want to make a model that can accurately determine how many points Miami will score on any given game. I want to use each starter as a variable. So it would be
MiamiPoints = intercept + C1*Lebron +C2*Wade + C3*Bosh + C4*Chalmers + C5*Haslem where each C is a coefficient of the variable.
Now, MiamiPoints would be a list points for each game, and each player would contain a list of points they scored each game. So looking at last nights data,
98 = intercept + C1*22 + C2*22 + C3*9 + C4*2 + C5*0
Once regression analysis is performed, we can get coefficients which help us make the right side get as close as possible to the left side.
Now, there are also techniques that tell you when you have too many variables, not enough variables, bad data etc. But regression analysis is definitely a sound way of trying to model things with multiple variables. But choosing the variables is another story entirely, which requires thorough analysis of the game. The example I showed is a pretty bad way to determine points Miami scores, since they are a team that rely on other players, other factors. Also using the formula before the game would be hard because you would have to predict how many points each player will score. I hope this helps in any way!