A little help understanding some basic algebra(I think) in conversion pathways Attached is a picture from my textbook. 



Here is my question:

Must the 3.18cm(1.25in X 2.54cm) have to be cubed(^3) in order to cancel the cm in the 1cm^3 that is beneath the 22.59g Osmium?

Is that a standard rule in algebra? And if it is, under what section might I find it. 

I've looked in Blitzer's 6th edition of Introductory Algebra for a clue but didn't find anything there. I've checked out Principles of General Chemistry by Martin S. Silberberg for a similar conversion but didn't find anything similar; all there was in that chemistry text book were much easier conversions.

I've even gone onto youtube and searched "multiplying fractions with unit and exponents" but couldn't find anything. 

I find it strange that the entire cm^3 doesn't cancel out and just the cm does.But cubing the 3.18cm is necessary to arriving at the given answer. I could assume that the 1cm^3 should be cancelled, but we cannot cancel the cm^3 on one side and not cancel the cm^3 on the other side, but if we did that, we would be removing the ^3 which is necessary to arriving at the given answer.

Thank you all
Yes, 3.18cm has to be raised to power 3.
$$Density=Mass/Volume$$ or upon rearrangement
$$Mass=Density*Volume$$
The information is provided about edge of the cube made of Osmium and its density. So in order to obtain mass of the cube, it is necessary to find the volume of the cube(since the information about density is supplied). The volume of the cube is edge raised to the power 3,i.e.,
$$Volume of cube=edge^3$$
Since the information regarding edge is provided in inches it has to be converted into cm because the units of density is provided in $g/cm^{3}$.
Once the the volume is also obtained in $cm^{3}$, the mass can be obtained in g.

Follow these steps:


Convert the length into same unit as the the length unit in density(here it is $cm^{3}$). So, 1.25 in=3.18cm
Now to obtain volume use the formula for volume,i.e., to cube the length. So, volume=$$(3.18cm)^{3}\approx 32.16cm^{3}$$
Multiply volume with density to obtain mass. $$Mass=32.16cm^{3}*22.59g/cm^{3}\approx723g$$