State Delegate Dan Cox was declared the winner Tuesday in the GOP gubernatorial primary in Maryland, delivering a victory for Republicans inspired by former President Donald Trump.