The speedometer working for the first few miles and then getting slower and slower until it doesn't move until it sits for a few hours is a sign your plastic gear inside the tcase is shot. It has a square drive for the speedometer cable. If your speedometer or cable are causing too much drag, probably from a kinked cable because your 4x4 shift levers smashed it. Then the still spinning gear just wallows out its sqaure until it is round. You can pull the reduction box off, stick tin foil on the stub that goes into the tcase. It might work for a drive or years.
The best bet is to pull the redux box off, make sure it spins free, make sure the cable spins free and the speedometer spins free. Inspect the yellow driven gear and if it is rounded, find a new one.