If someone is renting out part of their principal residence, they can likely still claim the capital gains tax exemption on the part of the home that is still their principal residence. However, they may need to pay capital gains on the part of the home that they are renting out.
This Canada Revenue Agency (CRA) page has more information: Changes in use