I am facing a problem to understand the formula to compute var(x) (variance of x). Any help in this regard would be highly appreciate

Find var(x), var(y)

Solution:

I am unable to understand how equals ?

Any detail, derivation even a link would be greatly helpful.

Thank you.