Speedo cable needs clean and re-grease - pop off the instrument cluster lid (back first then front), undo two screws holding in instrument cluster, pull speedo cable collar away from instrument, pull speedo cable off instrument.
Withdraw the speedo cable inner part, clean with WD40 and paper towels. Apply a smear of lithium grease, push back into the cable. Should be quite easy to engage in transmission - twist to make sure.
Refitting the cable to the instrument can be tricky - you have to make sure it's fully pressed-in before you slide the collar back into place.
If this doesn't fix it, check that the speedo cable in the engine bay follows a smooth curve to the transmission. Small kinks can often be straightened out.
-Alex