Let $A$ be a ring and $\mathfrak{p}$ a prime ideal. I'm trying to find out what the units are in $A_\mathfrak{p} = (A \setminus \mathfrak{p})^{-1}A$ and so far what have is that if $\frac{a}{b}$ is a unint where $a \in A$ and $b \in A \setminus \mathfrak{p}$, then there exists $\frac{c}{d} \in A_\mathfrak{p}$ such that $$\frac{ac}{bd}=1 \iff ac = bd.$$ Now $b,d \in A \setminus \mathfrak{p}$ so do we have that $$bd \in A\setminus \mathfrak{p} \iff b \in A\setminus \mathfrak{p} \text{ and } d \in A\setminus \mathfrak{p}$$ as this would imply that $$a \in A\setminus \mathfrak{p} \text{ and } c\in A\setminus \mathfrak{p}$$
in particular $\frac ab$ is a unit if $a \in A \setminus \mathfrak{p}$.
$\frac{ac}{bd}=\frac{1}{1}$ doesn't imply $ac=bd$ in general. It implies by definition that there is some $u\in A\setminus P$ such that $acu=bdu$. These are not equivalent.
Let $S=A\setminus P$, and let $a\in A, b\in S$. If $a\in S$ then $\frac{a}{b}$ is clearly invertible, with $\frac{b}{a}$ being its inverse. (this is a well defined element, because the denominator belongs to $S$)
Conversely, assume $\frac{a}{b}$ is invertible, i.e there are $c\in A, d\in S$ s.t $\frac{ac}{bd}=\frac{1}{1}$. Then there is some $u\in S$ s.t $acu=bdu$. Note that the right hand side belongs to $S$, as a product of elements in $S$. If so, the left hand side also must belong to $S=A\setminus P$, and in particular $a\in S$.