(a) Yes (b) No
Work Step by Step
(a) Yes, it is possible that $f(1)=5$ and $f(2)=5$ because a function is allowed to have two same $y$ values for two different $x$ values (for example, in the function $f(x)=|x|$, we get $f(1)=(-1)=1$). (b) No, it is not possible for a function to have $f(1)=5$ and $f(1)=6$ -- a function can not have two different $y$ values for the same $x$ value. This would fail the "vertical line test".