This question appeared in my text book while solving. I am not super sure about the solution to it. Can anyone please check my solution? I can't consult my professor right not (by mail) because it's midnight here.
I am unable to attach a picture of my work but my answer is: $$f:\{(1, 2), (2, 2), (3, 1)\}, and\\ g:\{(2,1),(1,3),(3,3)\}$$ It will be very helpful if you tell me whether it is correct or not.
Yours is correct. Another solution would be to take $f$ and $g$ to be constant functions $1$ and $2$. Then $$f\circ g=f\ne g=g\circ f$$