It's based on the same formula, except done in incremental ranges for the value of Ta. You will get similar-ish results whether you use the formula, or whether you use the table, and you can use either in practice. In an exam, the answer key is likely based in the expectation that you'll use the tables.
sqrt((Tc - Ta)/(Tc - T0))
Where
Tc is the rating of the conductor
Ta is the air temperature to which you are correcting the ampacity
T0 is the basis ambient temperature at which the conductor has its original ampacity rating
T0 is most commonly 30C. Some types of conductors that are less common have their original ampacities determined for T0=40C. If you rarely use the 40C rating, mark your code book clearly to indicate to avoid using that table by mistake.