Total 3 tables will be required.
1 Relation will be required for representing A. 1 will be required for B. Now since R1 is a one-to-many relationship, its attributes can be shifted to the many side(i.e. entity having total participation in this relationship).
And for many-to-many, always remember that we need another relation to represent it. This relation will consist of (primary key of A, primary key of B, attributes of R2).