Having won race one after coming out best following a collision with Schothorst, the Spaniard did not have the best qualifying session for race two, being forced to overcome a grid penalty after he was demoted from pole to fourth for exceeding the track limits in qualifying.
He managed to take the lead in the second lap though, building up a nine-second lead over Fabian Thuner as Stefano Comini retired and Schothorst struggled to build on a good start from the second row.
That was a lead Costa did not relinquish, winning ahead of Thuner while Kevin Gilardoni, who had started on pole, finished third. Schothorst was fourth.
Costa had been trailing Schothorst by 15 points before the weekend, but has put himself back in the title race.
"Today, starting from fourth, I wanted first and foremost to gain points on Bas Schothorst," he said. "I got away to a very good start and then waited for the right moment to overtake.
"It’s been the perfect weekend for me, and a great performance from the team. It’s great to have such quick team-mates. I’m still second in the championship, so I still have it all to do.”