What is the difference between K and Kp in the equilibrium equation?
The equilibrium constant is defined by the expression
$$K_x=\prod_{\ce{B}} x_{\ce{B}}^{\nu_{\ce{B}}}.\tag1$$

For $x$ you can substitute a number of quantities, most commonly when working with solutions is (amount) concentration $c$ and when working with gasses often the partial pressure $p$ is used. In the latter case the equilibrium constants can be related via the ideal gas law $$pV = n\mathcal{R}T.\tag2$$

Substituting this into $(1)$ gives you
$$K_p=\prod_{\ce{B}} \left(\frac{n_{\ce{B}}}{V}\mathcal{R}T\right)^{\nu_{\ce{B}}}.\tag3$$

This can be transformed into
$$K_p=\prod_{\ce{B}} \left(\frac{n_{\ce{B}}}{V}\right)^{\nu_{\ce{B}}} \prod_{\ce{B}}\left(\mathcal{R}T\right)^{\nu_{\ce{B}}}.\tag{3a}$$

We know that the concentration is defined as
$$c_{\ce{B}}=\frac{n_{\ce{B}}}{V}\tag4$$
and from $(1)$ we can set up the concentration based equilibrium constant
$$K_c=\prod_{\ce{B}} c_{\ce{B}}^{\nu_{\ce{B}}}
     =\prod_{\ce{B}} \left(\frac{n_{\ce{B}}}{V}\right)^{\nu_{\ce{B}}}.\tag5$$

Substituting $5$ in $3$ we find
$$K_p=K_c\prod_{\ce{B}}\left(\mathcal{R}T\right)^{\nu_{\ce{B}}}.\tag{6}$$

From the associativity of multiplication it follows therefore
$$K_p=K_c\cdot\left(\mathcal{R}T\right)^{\sum_\ce{B}\nu_{\ce{B}}}.\tag{7}$$

This is often abbreviated with $K=K_c$ and $\sum_\ce{B}\nu_{\ce{B}}=\Delta n$ and therefore
$$K = K_p\cdot (\mathcal{R}T)^{-\Delta n}.\tag{7a}$$



Associative law of multiplications for exponents:
\begin{align}
  x^{n+m} &amp;= x^n\cdot x^m\\
  x^{\sum d} &amp;= \prod_d x^d
\end{align}