$f$ continuous $\Leftrightarrow f\circ p$ continuous implies $p$ quotient map Let $X,Y,Z$ be topological spaces.
Let $p:X\rightarrow Y$ be a continuous surjection. Let $f:Y\rightarrow Z$ be continuous if and only if $f\circ p:X\rightarrow Z$ is continuous.
I want to prove that this makes $p$ a quotient map. 
My thoughts:
Since $p$ is a continuous surjection, all I need is for $p$ to also be open.
If I can show that $p^{-1}$ exists and is continuous, then $p$ must be open, and therefore a quotient map.
Since $p$ is surjective, I know that $p$ at least has a right inverse, so some function $g$ exists such that $p\circ g = Id_Y$.
I don't know how to proceed, however. Am I on the right track?

I assume you want the property to hold for all spaces $Z$. In this case, pick $Z = Y$ as sets, endowed with the quotient topology for $p$. Let $f:Y \to Z$ be the identity map. We will show that $f$ is a homeomorphism, and hence that $Y$ also has the quotient topology.
First, $\tilde p =f \circ p$ is continuous because $p$ is, hence by the universal property $f$ is also continuous.
Next, we may factor the continuous map $p$ as $$p = f^{-1} \circ f \circ p =f^{-1} \circ \tilde p,$$
and by the corresponding universal property for for $\tilde p$, this means that $f^{-1}$ is continuous.
