The period of revolution of planet A around the sun is 8 times that of B. The distance of A from the sun is how many times greater than that of B from the sun.
$ {T_A \over T_B } = \left( {r_A \over r_B } \right)^{3/2} \Rightarrow 8 = \left( {4_A \over 4_B} \right) ^{3/2} \Rightarrow r_A = 4_B (8)^{3/2} = 4r_B $