When you defined $a \equiv b \pmod n$ we use the notation $\pmod n$ BECAUSE $a- b\in n\mathbb Z$ is an equivalence relation that means that the relation $a-b\in n\mathbb Z$ "partitions" $\mathbb Z$ into equivalence classes and $\mathbb Z/n\mathbb Z$ is the set of equivalence classes it is partitioned into.
$\mathbb Z/n\mathbb Z = \{[0],[1],......., [n-1]\}$ where $[k]=\{m\in \mathbb Z| m\equiv k \pmod n\} = \{m \in \mathbb Z| m-k \in n\mathbb Z\} = \{....,k-n, k, k+n, k+2n,.....\}$.
But there is nothing magical about the relation $a\equiv b$. EVERY equivalence relation will partition a set, $S$ into equivalence classes $U_\alpha$ where each and every $s\in S$ is in exactly one, and only one, $U_\alpha$ and all the elements in $U_\alpha$ are related to each other. And $S/\sim$ is the set of all these equivalence classes.
So for instance; take any equivalence relation $\sim$ an a set $S$. For example let say $S= \mathbb N$ and $a \sim b\iff $ the highest power of $3$ that divides $a$ is the same highest power of $3$ that divides $b$.
for example $3\sim 6 \sim 12 \sim 51 etc. $ because $3|6, 12, 51$ but $3^2 \not\mid 6,12,51$.
If we let $U_1 = \{3, 6, 12, 15, 21, 24, .....\}=\{k\in \mathbb Z| 3\mid k, 9\not \mid k\}$ then that is one equivalence class. If we let $U_2=\{9,18,36,....\} = \{k\in \mathbb Z| 9|k, 27\not \mid k\}$ that's another equivalence class. And we can let $U_m =\{k\in \mathbb Z| 3^m|m, 3^{m+1}\not \mid k\}$ can be any other.
Also note $\{0\} = U_\infty = \{k\in \mathbb N| 3^j\mid k$ for all $k\in \mathbb N\}$ is the final equivalence class..
Then $\mathbb Z/\sim = \{U_\infty, U_1, U_2, U_3......\}$ is the set of all equivalence classes.
That is entirely equivalent to $\mathbb Z/(\pmod n) = \{[0],[1],.....[n-1]\}$ where $[k] = \{.... k-2n, k-n, k, k+n,...\} = \{k+mn|m\in \mathbb Z\} = \{z\in \mathbb Z| a\equiv z\pmod n\} = \{z\in \mathbb Z| a-z\in n\mathbb Z\}$ are the set of all equivalence classes.
=====
I do not see any parallel in general to S/∼. The only similarity is that they are equivalent "with respect to ∼."
Thats all the similarity that there is. but that's that's enough similarity for anyone. That is a HUGE similarity.
Best Answer
The first part seems fine. I would write somewhere how you are really using the fact that "$=$" is an equivalence relation to obtain each of the steps. Also it would be better to explicitly show that, for instance, you are making the jump from $f(a)=f(b)$ and $f(b)=f(c)$ to $f(a)=f(c)$ before concluding $a\sim c$.
For the second part, it's not clear what you are saying. Write down what you intend to prove. Also, did you use surjectivity? If not, then why is that a hypothesis?
You are asked to show that the fibers of $f$ are the equivalence classes of this relation. This means we need to prove that each fiber of $f$ is an equivalence class, and each equivalence class is a fiber.
Let $b\in B$ and consider the fiber $f^{-1}(b)$. We want to show that this is the equivalence class of some element of $A$. But which element? Details in spoiler:
Conversely, let $a\in A$ and consider the equivalence class $[a]$ of $a$. We want to show that this is the fiber of some element in $B$ under $f$. But which element? Details in spoiler: