There are two possibilities I think could happen.
The first is that before Black Maria could go after them Robin confronts her and frees Sanji, so instead of Black Maria Queen himself instead goes after them and before Queen could kill them that's when Sanji comes in and saves them.
The second is that Black Maria really does go after them, and before she could kill them that's when Robin comes in and saves them.
The first is that before Black Maria could go after them Robin confronts her and frees Sanji, so instead of Black Maria Queen himself instead goes after them and before Queen could kill them that's when Sanji comes in and saves them.
The second is that Black Maria really does go after them, and before she could kill them that's when Robin comes in and saves them.