The exercise 22 page 158 of Elements of Set Theory by B. Enderton is the following:
Show that the following statement is another equivalent version of the axiom of choice: For any set $A$ there is a function $F$ with $\text{dom }F=\bigcup A$ and such that $x\in F(x)\in A$ for all $x\in\bigcup A$.
The versions of the axiom of choice that I know for the moment are:
(although the Cardinal comparability and Zorn's lemma were stated as well, the author didn't prove yet that they're equivalent to the Axiom of Choice)
and the following form: (Exercise 18 in the same page)
I proved that AC III implies the statement of the exercise as follows:
Let $A$ be a set According to AC III there exists a function $f:\mathcal{P}A\setminus\{\emptyset\}\to A$ such as $\forall X\in\mathcal{P}A\setminus\{\emptyset\},\,f(X)\in X$.
Let
\begin{align*} g:&\bigcup A\,\,\to \mathcal{P}A\setminus\{\emptyset\}\\ &x \quad\quad\mapsto\{a\in A\mid x\in a\} \end{align*}
$g$ is a well defined function/
Let $F=f\circ g$. Then $\text{dom }F=\text{dom }g=\bigcup A$.
Let $x\in\bigcup A$. $F(x)=f(g(x))=f\left(\{a\in A\mid x\in a\}\right)$. Thus $F(x)\in\{a\in A\mid x\in a\}$. Thus $x\in F(x)\in A$.$$\tag*{$\square$}$$
I couldn't prove the other way. I had two ideas:( $F:\bigcup A\to A$ such that $\forall a\in\bigcup A,\,a\in F(a)\in A$)
1) We could try to construct an "inverse" of $F$. But $F$ isn't necessarily injective nor surjective. Thus such a construction would require the axiom of choice.
2) We could consider $f=F\circ g$ where $g:\,A\to \bigcup\bigcup A$ and $F:\,\bigcup\bigcup A\to\bigcup A$ but I couldn't find a suitable $g$.
Could you please help me? Thanks you in advance!

