R1 and R2 determine the output voltage as follows:
Vout = 1.25 * (1 + R2/R1)
So for the circuit you showed, Vout = 1.25 * 14.4 = 18V
For 24V output, you need r2 = 18.2 * R1.
You could use R1 = 1K and R2 = 18K. That should give 23.75V out, but it could be up to about 1V higher or lower than that due to component tolerances. If you need the voltage to be accurate, it is best to make R1 adjustable.