The rent or sale of the residential part of the building will be treated as zero rated or exempt, depending on whether it is a first supply or subsequent supply.
The rent or sale of a commercial part of the building will be treated as subject to VAT @ 5%.
The tax incurred by the owner of the building needs to be apportioned when there is an exempt supply and the portion related to the taxable supply (at 0% and 5%) can be recovered.