Also in the seconds before, the brakeman is riding the front plate while moving forward. This is definitely not allowed under WW&F rules - but may be understandable given they are switching across a grade crossing while on a curve.
It appears that the coupler on the locomotive wants to spring back to center, and they are coupling on a curve (and/or one of the couplers is somehow really-off center.) Certainly not ideal. I'm surprised that the brakeman isn't riding the footboard while holding the coupler - rather than walking backwards between equipment; that's really not a good idea.
That all said, we are not privy to their rulebook or their specific situation.