The math is all done for you here
Sheldon Brown's Bicycle Gear Calculator
the epicyclic internal gear is a % above or below the direct gear *, in a 3 speed that typically is the middle, 2nd one..
that gear is the chain ring teeth count turning the wheel cog tooth count ratio, ,'X' times .. multilied by diameter or circumference of the wheel.
*AW3 its 25% down, 33% up.. 3/4, 1, 4/3 ..