Well… The most simple equation I can think of is the equation of power:

Power = Force X Velocity, and in your case of gears, Power = Torque X Angular Velocity.

Assuming those Lego motors have constant power if you keep the battery fresh, you can use this formula to choose what gears to use.

The easiest way is to count the teeth of gears. Say, originally you use a 12 teeth gear on the output shaft of the motor driving another 12 teeth gear, and that generate a certain amount of force. If you want to increase the force, all you have to do is keep the same gear on the motor, and use a bigger gear with more tooth on the other shaft, or reduce the size of the gear on the motor…

Just think of it this way. If you switch the gear on the other shaft to a 24 teeth gear, which mean now in this stage you are using a 12 teeth gear to drive a 24 tooth gear, then for every turn the motor make, the other gear/shaft is going to turn half a turn, because the 12 teeth would only grip half the tooth on the bigger gear. So that mean, on the 24 tooth gear, the angular velocity is now 1/2.

Since it is almost constant power coming from motor, and Power = Torque X angular velocity,

Power = ? Torque X 1/2 Angular Velocity, solving for ?, you will see that there will be twice the torque for this equation to balance.

So to answer your original question. When you switch ratio from 1:1 to 1:3, you get three times the torque, and in return, the 24 teeth gear is 3 times slower.

Also, when you say you have a 12 teeth gear on the same shaft as the 24, as long as you keep the original gear that the 12 teeth gear is on contact with, then you won’t be changing the torque on that stage. So, over all, by switching from 12t to 12t into 8t to 24t, you are increasing the torque by a factor of three.

I hope I didn’t make this too complicated.