Explanation:
To achive that you have to piant a ring in red, which will have its big diameter equal to the sphere diameter and its small diameter equal to the cube diagonal.
The diagonal of the cube can be calculated using Pithagoras:

Where D is the diagonal and L is the side of the cube
7cm each. reason: the rod of 21cm lenght will be cut into 3pieces of 7cm each, while that of 14cm will be cut into 2 pieces of 7cm each. Therefore, there 5 pieces of rods of 7cm each. Thanks.