Proof (equal iff probability ratio independent of parameter implies minimal sufficient)

Sufficiency

For each value $t$ that $T$ can take, fix some representative element $z_t\in \sb{x}{T(x)=t}$. Then $$ \begin{align*} p(x; θ) = \underbrace{p(z_{T(x)}; θ)}_{g(T(x), θ)} \cdot \underbrace{\frac{p(x;θ)}{p(z_{T(x)}; θ)}}_{h(x)} \end{align*} $$ where the second factor does not depend on $θ$ by hypothesis as $T(x) = T(z_{T(x)})$. Then apply the factorisation theorem.

Minimality

Let $S$ be a sufficient statistic. By the factorisation theorem, $$ \begin{align*} p(x; θ) = g(S(x), θ) \cdot h(x). \end{align*} $$ Suppose $S(x) = S(y)$. Then $$ \begin{align*} \frac{p(x; θ)}{p(y; θ)} = \frac{g(S(x), θ) \,h(x)}{g(S(y), θ)\, h(y)} = \frac{h(x)}{h(y)} \end{align*} $$ which does not depend on $θ$. So $T(x) = T(y)$.