The ring map $A/\mathfrak{p}\rightarrow A_\mathfrak{p}/\mathfrak{p}A_\mathfrak{p}$ is injective because the inverse image of $\mathfrak{p}A_\mathfrak{p}$ in $A$ (under the localization map $A\rightarrow A_\mathfrak{p}$) is equal to $\mathfrak{p}$ (one of the first things one proves about the prime ideal structure of a localization). So there is a unique $A/\mathfrak{p}$-algebra map $\mathrm{Frac}(A/\mathfrak{p})\rightarrow A_\mathfrak{p}/\mathfrak{p}A_\mathfrak{p}$, necessarily an injection since the source is a field. But given $a/s+\mathfrak{p}A_\mathfrak{p}$ in the target, $s\notin\mathfrak{p}$ means $s+\mathfrak{p}$ is non-zero in $A/\mathfrak{p}$, so $a+\mathfrak{p}/s+\mathfrak{p}\in\mathrm{Frac}(A/\mathfrak{p})$, and this maps to $a/s+\mathfrak{p}A_\mathfrak{p}$ under the $A_\mathfrak{p}$-algebra map obtained above, so that map is an isomorphism.
Said somewhat differently, though more or less equivalently, if $I$ is an ideal of $A$, $S$ a multiplicative set, then the natural map $S^{-1}A\rightarrow\bar{S}^{-1}(A/I)$, where $\bar{S}$ is the image of $S$ in $A/I$, is surjective with kernel $S^{-1}I$, the ideal of $S^{-1}A$ generated by $I$, and so induces an isomorphism $S^{-1}A/S^{-1}I\cong\bar{S}(A/I)$ of $A/I$-algebras. Taking $S=A-\mathfrak{p}$, and $I=\mathfrak{p}$, you get an isomorphism $A_\mathfrak{p}/\mathfrak{p}A_\mathfrak{p}\cong(A/\mathfrak{p})_{\overline{A-\mathfrak{p}}}$. But $\overline{A-\mathfrak{p}}$ is exactly the set of non-zero elements of $A/\mathfrak{p}$, so the localization at $\overline{A-\mathfrak{p}}$ is the field of fractions of $A/\mathfrak{p}$. This isomorphism $A_\mathfrak{p}/\mathfrak{p}A_\mathfrak{p}\cong\mathrm{Frac}(A/\mathfrak{p})$ is the inverse to the one defined above.