In terms of costs, there are no advantages to having two shipyards build the ships. If it was the same shipyard building both ships, there would be economies of scale, or a learning curve that the shipyard would acquire, and would make the building of the second ship less expensive than if the contract was awarded to two different shipyards.
When it comes to economic benefits, having two different shipyards building these ships, it distributes more evenly the economic benefits of building these ships to two different regions, so there is a benefit inherent in that.
However, from a purely cost perspective, there are no significant advantages to doing that.