When both pull in the same direction, their net is 352.
When they pull in opposite directions, the net in one direction is 157.
If you want to set up the system of equations,
you should start with
A + B = 352
A - B = 157 .
then add them, etc.
You'll find that
-- Guy-A is the stronger one.
He's the one who moves to the other side,
and he pulls with 254.5 newtons both times.
-- Guy-B is the less strong one.
He stays put, and pulls with 97.5 newtons.