The speedo drive gear is a press slip fit on the front yoke of the universal joint. There is a driven gear (small one 90 degrees to torque tube) the speedo cable has a square end on both ends and just plugs (slides) into the driven gear. Looks like your cable just broke; you should be able to pull it out out of the driven gear end.