My answer will apply in the US and I am not an accountant but this is my understanding:
If you and a room mate both rent an appartment, you each rent a portion of the dwelling, and pay proportionally for utilities etc. Your room mate is not renting 'from you' but 'from your landlord.'
The landlord will deduct expenses of his/her business and pay taxes on the net from the rental income.
If you rent the dwelling and then host AirBnb guests, you are renting the entire dwelling and receiving the income. Then you will deduct YOUR expenses from your gross and pay taxes on your net. Part of your expenses is the proportional cost of the rent on the part of the dwelling and the amount of time it is used for AirBnb business.
For example, you have a two BR apartment and rent half of it on AirBnb, with a 50 % occupancy. You share the entire apartment 50:50 with your guests (they get one of two bathrooms, half the living room, half the kitchen etc.) You will deduct from your gross AirBnb income 25% of the rental cost, plus any supplies etc purchased exclusively for the AirBnb part of your dwelling. Other deductions could include cost of cleaner, laundry, internet used by AirBnb guests. After you deduct all the expenses you pay taxes on the net.
The only way to not pay taxes is to have expenses equal income. Or have AirBnb pay your landlord and have him report the income on his tax return.
In the case of a room mate, if you collect the money and pass it along to the landlord you are merely acting as the landlord's agent in transferring the money to him. In the case of AirBnb you are running a small business out of your home and receiving income for services.
Kerrin