proving the symmetric and transitive properties of an equivalence relation Let $S$ be a non-empty set, $A$ be the set of all functions from $S$ to $S$, and $B$ be the set of all bijective functions from $S$ to $S$. Define the following relation on A:
$$f \sim g \iff \exists h \in B \mid fh=g$$
where $fh$ is the composition of $f$ and $h$. Is this an equivalence relation on $A$?
This is what I have so far:
$ah=a ⇒  a^{-1} ah=a^{-1} a ⇒ eh=e⇒ h=e$ and $e \in B$ therfore $a \sim a$
Because $e$ is the identity element and all sets have an identity element, therefore it is reflexive.
$$ah=b ⇒ a^{-1} ah=a^{-1} b⇒ eh=a^{-1} b⇒ h=a^{-1} b$$
$$bh=a⇒ b^{-1} bh=b^{-1} a⇒ eh=b^{-1} a⇒ h=b^{-1} a$$
But I do not know how to show that since $a \sim b$ then $b \sim a$. I think I have a start but I’m not sure how to show this.
I am also not sure how to show that it is transitive because I keep solving for h but don’t know how to show this.

There is nothing that says that $a$ is bijective or that $a^{-1}$ exists.
But $h$ is bijective and $h^{-1}$ exists
Reflexive $a\sim a$
Let $h$ be the identity function.
Symmetric $a\sim b \implies b\sim a$
There exists an $h$ such that $a\circ h = b$
$b\circ h^{-1} = a$
Transitive $a\sim b$ and $b\sim c \implies a\sim c$
$a\circ h = b\\
b\circ g = c\\
a\circ (h\circ g) = c$
The composition of two bijections is a bijection.
