As Stephen Hawking says, we are in fact going to have to leave the planet in order to stay alive. Assuming that this is the case – we definitely need to prepare to leave at a certain rate if we are to leave in time and stand any chance.
The time we have left will also be determined by the extra time we give ourselves by doing what we can, now, to save the environment. Of course we want to save the environment for its own sake anyway, but now we have a second reason - to win us time for the preparation to leave. The preparation itself will be determined, largely, by the amount of resources that can be allocated towards it, i.e. not toward saving the environment.
In other words, we need to put the greatest amount of effort into the environment and insodoing acquire the most time we can get, with the least expense to the preparation itself (in case we don’t make it).
If my memory serves me correctly (which it probably doesn’t), the mathematical tool needed to optimise two such grand plans is something called linear programming. But we will need an enormously complicated version of it, similar to the calculations used to determine our personal or corporate environmental footprint. Plenty of people are good at these calculations and it strikes me as something that needs to be calculated too if we are to really not waste any time and allow for the most pleasant time we have left here.