A cube basically has same length, width, and height. So if the length is 2, then the width and height has to be 2.
To find a volume of a cube, you would have to multiply length × width × height. Since the length, width, and height are all same, you can write the formula as
V = x³ (x is the length, width, and height!)
So your question gives the volume already ; 27cm³. You would have to multiply same number three times in order to get 27. ∛27 = 3. 3 × 3 × 3 = 27. So you know that your length, width, and height is 3cm!