WASHINGTON  Carly Fiorina and Meg Whitman, who ascended to the top of the business world before turning to politics, prevailed on Tuesday in their respective battles for the Republican nominations for the United States Senate and governor in California, setting the stage for costly general election fights this fall.

Ms. Fiorina, a former chief executive of Hewlett-Packard, beat Tom Campbell, a former congressman, and Chuck DeVore, whose candidacy drew the backing of many Tea Party activists. She will face the incumbent senator, Barbara Boxer, a Democrat, in the fall.

Ms. Whitman, the former chief executive of eBay and a billionaire, had invested a small share of her personal fortune to prevail in the governor’s race over Steve Poizner, the state insurance commissioner, who put $24 million of his own money into his primary campaign. She will challenge Jerry Brown, the state’s Democratic attorney general, who was first elected governor of California three decades ago.

Image Carly Fiorina, the former chief executive of Hewlett-Packard, won her Senate primary. Credit... Chris Carlson/Associated Press

California voters also approved a measure that would replace traditional primaries in state and Congressional elections with, effectively, two rounds of voting, which could have a profound effect on the state’s political future. All candidates would run in the first round, and the top two vote-getters  regardless of party affiliation, or unaffiliation  would then face each other in the general election. Supporters hope the new system will produce more moderate candidates; political parties have been vehemently opposed.