Maybe the most simple is to create a loop over the roles and retrieve the areas from the database with something like [area_entity/entity/role_entity = iterator_role]. Store those in a list and at the end of the loop you have all the areas. As you state that an area should be retrieved when both roles or one of the roles is associated then checking on if any of the roles match is enough.
When you need to go over may roles then this could become a performance issue, then maybe split the iteration over multiple parts.
Another option could be to use the OQL features to create a statement where to comparison to the list of object(id) can be used as this is not directly possible in the xpath statement, hence the error you are getting. There is an idea on the forum for Mendix to support comparing lists in xpath but this has not been implemented, see https://community.mendix.com/link/space/xpath/ideas/580