Number of functions question

I did the question by making cases where f(x)=x or {f(x)=y,f(y)=x} or where connecting x to f(x) forms a closed cycle of 4. Does the given solution consider this? Or am I committing a flaw here?
WhatsApp_Image_2025-03-27_at_11.35.26_a00d605a.jpg
WhatsApp_Image_2025-03-27_at_11.37.08_a5a0289b.jpg
Was this page helpful?