She shook his hand - or rather, it was her clasping his with both of hers, sandwiched in between velvet skin and bad luck and bad choices - and then Regina let go. Even if Mary Margaret wasn't here, David could find his way back to the school's entrance/exit just fine; she had to finish up, and possibly plan on stopping for a bottle of champagne to wash down her headache medicine with when she got home. It had been an odd encounter. Not bad...just odd.
"You too, David. Take care, and until we meet again." Which would probably be in one way or another, in the waking world or not.
Then she turned and headed off in her power heels, leaving him to his lovebird devices.