Hi Sai,
You can create a composite role RoleAB using transaction PFCG and assign the roles Role A and Role B in the roles tab, then click on save.
And in the Menu bar of this composite role you need to copy the menus by clicking on Read menu.
The menus of Role A and Role B will now be in a single composite role and this Composite role RoleAB can be assigned to the user, instead of assigning the single roles Role A and Role B.
Regards,
Laxman Gaddam