Hi,
You are not computing redBlockSprite sides coordinates properly.
For example, if you want to know the left side x coordinate, it is
redBlockSprite.getPosition().x (assuming its origin is (0,0)).
Then, when setting position, there are still issues with sides coordinates for the bottom and right cases.
For example, if you want the left side of the characterSprite to be on the right side of the redBlockSprite, you want that :
position.x // character left side
= redBlockSprite.getPosition().x + redBlockSprite.getGlobalBounds().width; // redBlock right side
This kind of formulas are easy to find with a diagram, so take a paper an a pencil, it will be obvious.