IndeedThis is a classic paradox. Let's set $c = 1$ and start by working in the lab frame, where the muon will think that our clock is not only running slowcreated at $x = 0$ and $t = 0$ and travels to the right with speed $v$. It decays at $x = d$ at the moment it crashes into a clock, but running aheadwhich reads $t = t_{c,f}$. Then of course, bywe have $$d = v t_{c,f}, \qquad t_{c,f} = \gamma \tau$$ by the usual relativisticdefinition of speed and time dilation, where $dv/c^2$ delay$\tau$ is the lifetime of the muon in its rest frame.
Now let's work in the muon's frame, described by primed coordinates. The finalmuon is created at $x' = 0$ and $t' = 0$. At this moment in the muon's frame, $t' = 0$, the clock is at $x' = d/\gamma$ but its reading we take down$t_{c,i}$ is not zero. Instead, accordingperforming a Lorentz boost back to the lab frame, $$t_{c,i} = t = \gamma (t' + v x') = \frac{\gamma v d}{\gamma} = v d.$$ Of course, the clock will crash into the muon at $t' = (d/\gamma) / v = \tau$, which is precisely when the muon decays. At this moment, the reading on the clock is $$\frac{t}{\gamma} + \frac{dv}{c^2} = \frac{t}{\gamma} + \frac{v^2}{c^2} \frac{t}{\gamma} = \frac{t}{\gamma} \gamma^2 = \gamma t$$$$t_{c,i} + \frac{\tau}{\gamma} = v d + \frac{d}{v \gamma^2} = \frac{d}{v} \left(v^2 + \frac{1}{\gamma^2} \right) = \frac{d}{v}$$ which is perfectly consistent with whatprecisely the final reading $t_{c,f}$ we calculatefound in ourthe lab frame. So the paradox is resolved by remembering that $t_{c,i}$ isn't zero, due to the relativistic loss of simultaneity effect.
Of course, this answer depends on the machinery of Lorentz transformations, reference frames, and synchronized clocks. AXensen's answer gives a different explanation directly in terms of what the muon and Earth observers "see".