Tua Tagovailoa and the Miami Dolphins overcame a sloppy first half and held on to defeat the Los Angeles Rams to keep their playoff chances alive.