Answer
a-f is not one to one
f is not onto
b-
g is one to one
g is onto
Work Step by Step
$a-\\
X=\left \{ 1,5,9 \right \}\,\,and\,\,Y=\left \{ 3,4,7 \right \}\\
F:X\rightarrow Y \\
f(1)=4\,,\,\,f(5)=7,\,\,f(9)=4\\
Is\,f\,one\,to\,one ?\\
A\,function\,\,F: X \rightarrow Y\,is\,not\,\,\,one-to-one\,\Leftrightarrow \\
\exists \,\,x_{1}\,and\,x_{2}\,\,in\,\,X\,\,such\,that\,\,
F(x_{1}) = F(x_{2})\,\,and x_{1} \neq x_{2}.\\
\because 1\neq 9 \,but\,f(1)=f(9)=4\\
so\,f\,isnt\,one\,to\,one\\
\\
F: X \rightarrow Y is\,\,not\,\,onto\,\Leftrightarrow \,\\
\exists y\,in\,Y such\,that\,\forall x \in X, F(x) \neq y.\\
\exists3\in Y\,\,but\,\,f(3)\,is\,not\,defined\\
so\,f\,\,is\,\,not\,\,onto\\
$
$b-\\
X=\left \{ 1,5,9 \right \}\,\,and\,\,Y=\left \{ 3,4,7 \right \}\\
g:X\rightarrow Y \\
g(1)=7\,,\,\,g(5)=3,\,\,g(9)=4\\
Is\,g\,one\,to\,one ?\\
A\,function\,\,g: X \rightarrow Y\,is\,\,one-to-one\,\Leftrightarrow \\
\forall \,\,x_{1}\,and\,x_{2}\,\,in\,\,X\,\,if\,
F(x_{1}) = F(x_{2})\,\,then\,x_{1} = x_{2}.\\
\\
\begin{pmatrix}
1 &\rightarrow 7 & \\
5 &\rightarrow 3 & \\
9 &\rightarrow 4 & \end{pmatrix}\\
so\,g\,is\,one\,\,to\,\,one.\\
g: X \rightarrow Y is\,\,onto\,\Leftrightarrow \,\\
\forall y\,in\,Y ,\exists x \in X\,such\,that\, g(x) = y.\\
and\,this\,is\,clear\,from\,the\,picture\,\\
so\,g\,\,is\,onto
$