@Michael Vialpando Yes, that looks like a good start. You would also have to figure how much of the shared space in the main house is used by renters. An easy way to do this is to just count the number of people who use that common area, e.g., you have a common bathroom that is shared by you, your wife, and your tenant. I would call that shared space 1/3 rental use. Perhaps a slightly more aggressive (in your case) would be to allocate that shared space pro rata based on the allocation of the rest of the house, e.g., in your case, 40% personal / 60% rental.
So I would use your first section "House" to allocate expenses directly attributable to main house, e.g., utilities paid for the main house.
And I would use your second section "Cottage" to allocate expenses directly attributable to the cottage, e.g., utilities paid for the cottage.
And I would use your third section "Whole Property" to allocate expenses not directly attributable to either unit, e.g., property taxes on the property as a whole.
Also, you should take the depreciation deduction. Your gain on sale will be based on depreciation allowed or allowable, i.e., whether you actually took it or not.