when you've added a rental onto your property where you live, how is the rent handled?

we built an ADU and some expenses are shared and some are just the ADU (attached dwelling unit) - like a mother-in-law cottage...