Answer:
$0
Step-by-step explanation:
IRS's Section 1031 allows real estate investors to exchange real properties and defer any capital gains tax. In this case, Patty doesn't need to report any gain because she is exchanging her apartment house (with 100 rented apartments) for an office building (with 40 rented offices).
In order for a property to classify as a 1031 exchange, it must involve properties that have similar uses. In this operation, both properties have rental units.