Takeoff performance charts do the thinking for us but the basic premise is getting max takeoff weight for given conditions.
The takeoff chart is computed for a given runway under a set of conditions, which are :
– OAT
– Wind
– Configuration
– QNH, air conditioning, anti ice...
FCOM 04A Section 2.02 Takeoff has some info also OM6A performance examines aspects of takeoff.
Generally speaking:
TAKEOFF PROCEDURE Depending on environmental takeoff conditions, the following procedure is recommended.
CONDITIONS Dry or wet well paved runway
PROCEDURE
– Use the flap setting giving the highest flexible temperature.
– When flexible temperature difference between two flap settings is low, use the highest flap setting.
REASON Extend engine life and save maintenance costs.
CONDITIONS High altitude takeoff
PROCEDURE
– Use CONF2/CONF3
REASON Improve comfort
CONDITONS Badly paved runway or Accelerate stop distance limited runway
PROCEDURE
– Use CONF2/CONF3
or
– Move towards left side of the takeoff chart
REASON Improve comfort
Improve stopping distance
There are more explanations but I'll leave them for your research..
BTW to my knowledge this question is not in the tech exam.