Not sure If I have the write formula to solve the equation.

Here are the givens

1 mile = 5280 feet

1 meter = 3.28 feet

1 kilometer = 1000

I'm trying to convert feet and miles into kilometers here is what my formula looks like

5280 multiplied by X miles = feet

3.28 divided by X feet = meters

1000 divivded by X meters = kilometers

Is this correct to solve convert miles and feet into kilometers or am I missing a step or so?