It seems that the question above is incomplete. I believe the complete statement would be written as: When placed in a 100 mL cube-shaped box, a substance fills the cube and has a volume of 100 mL. When placed in a 50 mL tube, that same amount of substance fills the tube and thus has a 50 mL volume. What is the state of the substance?
From the statement, most likely, the substance is a gas since the volume it takes is the same as its container. Gas is the only phase that could take up the whole volume of its container given a certain mass.