A={1,2,3,4} B={1,2,3,4,5,6}
Here f(3) can be 2,3,4,5,6 f(3)=2,(f(1),f(2))→(1,1)→6 cases f(3)=3,(f(1),f(2))→(1,2),(2,1) →2×6=12 cases f(3)=4,(f(1),f(2))→(1,3),(3,1),(2,2) →3×6=18 cases f(3)=5,(f(1),f(2))→(1,4),(4,1),(2,3) (3,2) →4×6=24 cases f(3)=6,(f(1),f(2)) (1,5),(5,1),(2,4),(4,2),(3,3) →5×6=30 cases
Total number of cases =6+12+18+24+30=90