Sales of 2 family house that is partial investment and partial primary home

I have a 2 family house that I have sold. Unit 1was mostly rental and  units 2 was mostly primary use.  The unit that is primary, I have lived there 3 years and rented 2 years.

I have split the cost and sales value into 2 and when I entered unit 2, It seems that I don't need to pay any capital gains since it was a primary home but also it didn't ask me for depreciation on the 2 years that was rented out. Do I need to include that in the depreciation in Unit 1?