@Susan O.
I do not believe that there is a black-n-white answer to each of the questions you asked. So let's tackle one at a time.
1. Depreciation recapture. You cannot escape it on any of the units, no matter what. The only way to not pay depreciation recapture is to defer capital gains, since depreciation recapture is a part of capital gains.
2. Capital gain. You can defer capital gains via either a 1031 exchange or Opportunity Zone funds. 1031 exchange is not worth it unless your capital gains are high enough, which we do not know. A triplex in Fresno over 5 years might have enough capital gains to make it worthwhile. Beware that combining personal residence exclusion with 1031 is highly complicated, especially in your case.
3. California. You need to take into consideration CA state taxation that does not always follow the Federal rules. For example, CA does not recognize Opportunity Zones as a capital gains deferral mechanism.
4. Full exclusion. Your Unit A was your residence first and a rental later. This, if considered separately from other units, qualifies for the full capital gain exclusion, except for depreciation recapture.
5. Prorated (partial) exclusion. Your Unit B was a rental first and your residence later. This, if considered separately from other units, only qualifies for a partial exclusion, based on number of months. For example, it it was a rental for 30 months and then your residence for 25 months, you can only exclude 25/55 of your capital gains. OK I DIDN"T KNOW THIS
6. Mixed-use triplex. Normally, it would be considered as two properties: 1/3 personal and 2/3 rental, possibly adjusted for the common areas. Upon sale, you can exclude 33% of the gain and owe taxes on the 67%.
7. Switching units. In your case, it would be 3 properties. Unit A qualifies for the full exclusion. Unit B qualifies for a prorated exclusion (or not - see #8 below). Unit C is fully taxed. I'm not sure if there's a more creative and beneficial way to interpret it for tax purposes. Maybe one of my colleagues can suggest one.
8. Aggregating sales of 2 units for exclusion. If they were truly 3 separate properties, you would not be able to claim ANY exclusion, even prorated, on Unit B due to the "one sale every 2 years" restriction. There're some exceptions to this rule, but I cannot see how you can qualify for such an exception, short of something extraordinary like having been a victim of a crime while in Unit A.
However, in your case, this is one physical property, so maybe you can treat both Unit A and B as a single sale for the exclusion purposes and apply full exclusion to Unit A and also partial exclusion to Unit B. Maybe. I cannot say yes or no without researching this issue.
PS. If you switched units for tax purposes, you deserve A for creativity and F for tax planning, because it should've been researched beforehand.