If they had worked it out, I think Riley would have died horribly soon after. So he was lucky. 🙂
It's the Whedonverse after all, and unless the relationship was taken in a very different direction, it had played it's part on the show and had to end.
But, let's pretend it's not the Whedonverse. Then they would definitly have gotten back together and probably dated for a while. I think Buffy really did love Riley, but was just bad at showing it since season 4, since she got so distracted with the Key, Glory and cancer business, so maybe they could have worked it out. Or, Riley would still be insecure and/or Spike would find a way to break them up, and it would end after a while anyway.
I think this would have been a suitable storyline, and pretty Whedon-ish.
Buffy catches up with Riley, they date for a while. Things aren't going smoothly, but they're happy. Spike confesses his love and everything stays similar to the real season 5. But Riley dies when Glory comes for Dawn. Another reason for Buffy to break down.
Then season 6 would have pretty much stayed the same. Except Buffy would have suffered more... I guess that might be worse. But I'm really sick of wondering if they could have worked it out if Buffy had been faster. It kills me not knowing. Couldn't Riley say in season 9 that he loves Sam more than he ever loved anyone so I don't have to wonder? Urgh!