Derivation of p(x)

Giving my own derivation of p(x)