I would prefer drawing a picture - but let's try writing symbols instead.

Try to think about what exactlymeans

You can rewrite it as the following 3 conditions:

a=F(f(a))=F(3)

b=F(f(b))=F(1)

c=F(f(c))=F(2).

Now we know the values of F(1),F(2),F(3) - the function F is fully determined, isn't it?

Note that (if you draw a picture) F is the same as f, but with all arrows reversed.

I think you could be able to do the second part in a similar way.