It's hard to judge but the wind appears to be coming from forward at the time it came back down. They went up when they bore off to port on a starboard reach, then corrected by steering back to windward. That might have been the wrong tactic, depending on how far they were already through the turn to port. I think they got lucky. Sometimes it's better to be lucky than good.