The way I understand it, you have to mobilize any new units you purchased if there is any possible place to put them. You only get reimbursed for the cost if there is no place to put them.
Since new ships can be placed in hostile sea zones, those 2 carriers would have to be placed in SZ 6 unless Japan had another factory where they could place them. Now, if the US had bombed Japan’s factory and it had 10 points or more of damage, and Japan either had no other factories or had already committed other units to them, then you could return the 2 carriers and get the IPCs back for them.
If there is a possible place to mobilize those carriers, even if it is undesirable, you have to place them.