Prime and Factorization, prime divisor property Let $p$ be prime. Then if $p|ab$ then $p|a$ or $p|b$.
Proof:
Suppose  $p$ does not divide $a$
Then $\gcd (a,p) = 1$ since $p$ is prime. 
$$ 1 = ma + np $$
$$ b = mab +npb$$
Since $p|map$ and $p|npb$ then $p|b$
I have a problem understanding that $p|map$, can anyone show me how this works?

Note that the initial condition is $p|ab$, so from this follows that $ab = pk$, where $k$ is some positive integer. Assuming that $gcd(p,a) = 1$, then from the Bezout Lemma follows
$$1 = ma + np$$
$$b = mab + npb$$
This is something that you've already done, now make the substitution and get:
$$b = mpk + npb$$
$$b = p(mk + pb)$$
Because the term in the parenthesis is integer it follows that $p|b$
Q.E.D.
