I will speculate that the odometer and the trip odometers run off of different electrical circuits. The main odometer should have an electrical connection to the PCM, which logs mileage, while the trip odometer does not need that connection to the PCM. There may be a loose connection or a short in the wiring from the odometer motor to the PCM or from the PCM to the dash display. Just speculation, mind you. Hopefully, it's not a PCM failure.