Think about the circumstances of the UK.
Consider the lifetime cost, not of an individual aircraft, or a squadron, but of a fleet devoted to naval aviation, of a subtype different from those based on land - & with no operational crossover. Whatever naval aircraft you have are all that you can ever put on your carriers. The land-based variant is purely land-based. Even if you buy a carrier variant for land-based operations, it'd still not be easily deployable at sea, because the pilots aren't carrier trained.
You either need to buy more carrier aircraft than you want to put to sea most of the time, buy the carrier variant for everyone & have land-based pilots carrier-trained & rotating through refreshers regularly (both expensive), or accept that your carriers will always be short of aircraft, & desperately short of them in some circumstances.
Add in the costs of catapults, rebuilding ships that are pretty well built, & operating & maintenance costs for catapults.
For forces the size of the RN & RAF, are you sure B is more expensive?