Renars Krastenbergs scored for Latvia (0-0-1-0). Elvis Merzlikins allowed four goals on 32 shots through two periods before being replaced by Arturs Silovs, who made five saves.
Nelson, a forward for the Colorado Avalanche, scored the game-winning goal at 10:38 of the second period when he put the U.S. ahead 2-1. Jack Hughes found him with a pass on the cycle, and Nelson went forehand-to-backhand to draw Merzlikins out of position before tucking the puck in at the right post.
Thompson made it 3-1 with a backhand under the bar for a power-play goal at 17:35.
Nelson extended the lead to 4-1 with 12 seconds left in the period, knocking in a cross-slot pass from Jack Hughes to cap a pretty passing sequence inside the Latvia zone.