The Cowboys (5-14, 1-5 Mountain West Conference) ended a five-game losing streak and pushed the skid for the Spartans (3-15, 0-6) to nine games. San Jose State has lost six straight times against Wyoming and is 0-10 in Laramie.
Thompson had 12 of his 15 points in the second half, going 4 of 7 from 3-point range, and James had 10 of his 20.
Wyoming scored the first 11 points of the game but San Jose State had an 11-0 run of its own and the game was tied at 24 at halftime.
The Spartans opened the second half with two buckets but James hit back-to-back 3-pointers, Jordan Naughton converted a 3-point play and James scored two more baskets for a 13-0 run.
Thompson sandwiched 3-pointers around a Trace Young fast-break dunk as the Cowboys stretched the lead to 15. When the Spartans got it down to nine on a layup by Michael Steadman, who led with 10 points, Thompson hit consecutive 3s and the lead stayed in double figures the last 4 1/2 minutes.
Mid-majors 2019-20 predictions: What's a mid-major, anyway?
As the countdown to the 2019-20 college basketball season continues, ESPN's predictions series focuses on the top leagues beyond ... the top leagues.
2019-20 College basketball preview: Preseason picks, rankings, complete coverage
The countdown to the 2019-20 college basketball season has begun. Your preparation begins right here.
House, Senate members drum up support for compensating college athletes
Members of the House and Senate spent Wednesday trying to drum up support for finding new ways to compensate college athletes.