The distance() function wont distinguish between different x and y target values, so don't check that way.
instead, directly compare the x values and the y values. Since the enemies can be on either side and above or below, you could end up with either positive or negative values. so, use the ABS() function (which returns the absolute value, always positive).
So, where you have the first sub event where you check Distance, replace that with:
System: Compare two values: ABS(BoxWalker.X - BoxPsi.X) <= 200
then add another condition:
System: Compare two values: ABS(BoxWalker.Y - BoxPsi.Y) <= 50
and, as TiAm said, then later use ELSE where you have the second Distance() function.