They are both colliding. I presume you want to 'stop' the first one when it collides with the second?
To stop, simply stop moving it.
However, I gather you probably want to move it to where it was no longer colliding?
There are a number of approaches.
1) Easiest is to just put it back to where it was before it collided.
2) Another would be to work out which direction (of the four main directions) you want it be 'ejected' from the other object and then place it so that their edges match (this seems to be what you're going for).
3) A more accurate way would be trace the move between the two positions and calculate the position where they would intersect. You can do this after colliding and return it to this position, or before colliding when working out if it will be collided in advance.
As an example of (2), if you wanted to 'expel' a sprite (sprite) to the left, you would set it's x position so that it's right side matches the other object's (_sprite) left side. Something like this:
sf::Vector spritePosition{ sprite.getPosition() };
spritePosition.x = _sprite.getPosition().x - sprite.getTexture().getSize().x;
sprite.setPosition(spritePosition);
Note that getTexture().getSize().x is the width of the sprite
unless the sprite is scaled.
Also, we presume no rotation is involved.