We must first argue that {\mathopen {}\left \{{\mathopen {}\left [a\right ]\mathclose {}}_{E}\,\middle \vert \,a:A\right \}\mathclose {}} in fact constitutes a partition; the union of all equivalence classes is indeed all of A, and we can see that any two distinct equivalence classes have null intersection — since, if there were an intersection, the two equivalence classes would be identical.
The inverse \Phi ^{-1} sends a partition P to the following equivalence relation:
x \mathrel {{\mathopen {}\left (\Phi ^{-1}{\mathopen {}\left (P\right )\mathclose {}}\right )\mathclose {}}} y\Longleftrightarrow \exists b: P\mathpunct {.} x\in b \land y \in b
To check that \Phi ^{-1} is a section of \Phi , we fix a partition P to check that \Phi {\mathopen {}\left (\Phi ^{-1}{\mathopen {}\left (P\right )\mathclose {}}\right )\mathclose {}} = P.
\begin {aligned}
\Phi {\mathopen {}\left (\Phi ^{-1}{\mathopen {}\left (P\right )\mathclose {}}\right )\mathclose {}} &=
{\mathopen {}\left \{
{\mathopen {}\left [a\right ]\mathclose {}}_{\Phi ^{-1}{\mathopen {}\left (P\right )\mathclose {}}}
\,\middle \vert \,a:A\right \}\mathclose {}}
\\
&=
{\mathopen {}\left \{
{\mathopen {}\left \{x: A\,\middle \vert \,x \mathrel {{\mathopen {}\left (\Phi ^{-1}{\mathopen {}\left (P\right )\mathclose {}}\right )\mathclose {}}} a\right \}\mathclose {}}
\,\middle \vert \,a:A\right \}\mathclose {}}
\\
&=
{\mathopen {}\left \{
{\mathopen {}\left \{x: A\,\middle \vert \,
\exists b: P\mathpunct {.}
x\in b \land a \in b
\right \}\mathclose {}}
\,\middle \vert \,a:A\right \}\mathclose {}}
\end {aligned}
As P is a partition, there is exactly one block containing a given element a:A — no more than one by disjointness, and no fewer than one because the union of a partition must be the entire set. Therefore, the set {\mathopen {}\left \{x: A\,\middle \vert \,\exists b: P\mathpunct {.} x\in b \land a \in b\right \}\mathclose {}} is precisely the unique block of P containing a. Thus we have \Phi {\mathopen {}\left (\Phi ^{-1}{\mathopen {}\left (P\right )\mathclose {}}\right )\mathclose {}} = P.
Conversely, we must show that \Phi ^{-1} is a retraction of \Phi . Fixing an equivalence relation E\colon A\mathbin {\nrightarrow } A, we must check that \Phi ^{-1}{\mathopen {}\left (\Phi {\mathopen {}\left (E\right )\mathclose {}}\right )\mathclose {}} = E. Fixing x,y:A, we proceed using relational extensionality:
\begin {aligned}
x\mathrel {{\mathopen {}\left (\Phi ^{-1}{\mathopen {}\left (\Phi {\mathopen {}\left (E\right )\mathclose {}}\right )\mathclose {}}\right )\mathclose {}}}y
&\Longleftrightarrow
\exists b: \Phi {\mathopen {}\left (E\right )\mathclose {}}\mathpunct {.}
x\in b \land y \in b
\\
&\Longleftrightarrow
\exists a:A\mathpunct {.}
x\in {\mathopen {}\left [a\right ]\mathclose {}}_{E}
\land
y\in {\mathopen {}\left [a\right ]\mathclose {}}_{E}
\\
&\Longleftrightarrow
\exists a :A\mathpunct {.}
x\mathrel {E}a\land y\mathrel {E}a
\\
&\Longleftrightarrow
x \mathrel {E} y
\end {aligned}