There are many cell reference types eg relative,absolute and mixed cell referencing. if you write your cell reference in relative type then it will change as you copy it to another cell. if you select absolute cell referencing then it will not change if you copy to another cell.
The gear ratios would look like A:B=1:9 and C:D=1:32 if you are just needing the gear teeth ratio. Not a lot of information to go off of from the question though