Confused with the formula for Power Factor Correction
From comments - I'm not sure which formula you are confused with.

It's the first one that I'm trying to derive, but can't seem to reach
anything. – Essam

Well real power (P) is \$\dfrac{V_{RMS}^2}{R}\$ and reactive power (Q) is \$\dfrac{V_{RMS}^2}{X_C}\$.
And, given that \$X_C= \dfrac{1}{\omega C}\$ we can say this: -
$$Q = \omega C \cdot V_{RMS}^2\hspace{2cm}\text{or}\hspace{2cm} C = \dfrac{Q}{\omega\cdot V_{RMS}^2}$$