Here's the move sequence that was worked out for level 21:
2 down, 1 right, 2 up, 1 right, 2 down, 1 up, 1 right, 2 down, 2 right, 1 up, 1 left, 1 up, 1 right, 1 left, 2 up, 3 right, 2 down, 1 left, 1 up, 1 left.
B-Cubed is a sliding-block puzzle where the order of moves is everything — the cube only travels until it hits something, so each step is about setting up the stop for the next one. That's why a written sequence works better than trying to reason it out mid-level.
If a step doesn't behave as described, check that you're starting from the level's initial position, since the whole sequence depends on it.