If you still have your serial number, you should have no trouble downloading and installing LR 5 on the new Mac. If you had the CC version of LR 5, then you download the CC version. If you had the stand-alone version, you download the standalone version.
To move your photos and catalog, see How do I move Lightroom to a new computer? | The Lightroom Queen