I am not an attorney, so this is not a legal opinion...just my initial response to your question......which is........
No, it isn't legal to arbitrarily rent out (multiple) rooms in a single family house (thereby turning the house into a rooming house). You need to check with the town building codes, zoning regulations, fire inspection codes and any other restrictions.
In addition - if a basement doesn't have egress (a way to get out in an emergency) , it usually can
t be consdiered as a legal bedroom.............so, there will be a huge liability incurred if it is used as such.
Another issue that needs to be investigated is homeowner's insurance.