As soon as you enter Chamber 5, fire a portal down at your feet and you'll soon fall through and into the main room itself.
This'll cause the Cube to fall through to where you are, so pick it up and set it on the large red button on the floor. Doing this will raise a flight of stairs on your left, so walk up here and you should notice two more plunger buttons overlooking the acid below.
With the Companion Cube safely on the ground, run back down, pick it up and take it back up to the red button on the ground. Doing so will open up the exit to the next test.