We need to treat units that are rental and the unit which is used as a personal residence as separate assets.
Both - purchase and selling price must be apportioned.
You may use any apportioning method that is reasonable.
Most often approach is based on sq footage.
But you may apportion based on the number of bedrooms if that is easier or more advantageous.
Using that method - we have 1/3 personal use and 2/3 rental use.
When we allocate the purchase price
$262,000 * 1/3 = $87,333 - will be the basis for personal use property and
$262,000 * 2/3 = $174,667 will be the basis of rental asset.
Similarly we will allocate the sale price.
Assuming you will sell the property for $600,000
$200,000 will be allocated to personal and $400,000 to rental .
Separately we will calculate the gain
For personal part
$200,000(selling price) MINUS $87,333(basis) = $112,667
That gain is excluded according to section 121
For rental part
we will estimate depreciation.
residential rentals are depreciated over 27.5 years
so your accumulated depreciation might be
$174,667(basis) / 27.5 * 22 = $139,734
$400,000(selling price) MINUS $174,667(basis) PLUS $139,734(accumulated depreciation) = $365,067
Most of that gain would be taxed at 15% rate.
That is just an illustration example.
Your actual amounts might be different.
Let me know if any adjustments needed.