For the required Relation we have to find the ordered pairs where x co-ordinate is from set A which is mapped to the y co-ordinate from set B.
So, the relation is {(5,a),(5,b),(7,b),(7,c),(9,a),(9,b),(9,c)}
Domain is the set of all x co-ordinates ={5,7,9}
Range is the set of all y co-ordinates ={a,b,c}.