Consider a grid as shown in figure having 8 blocks of dimension 1 × 1. Each block is to be painted with
either blue or red colour. In how many ways this can be done if at least one block of dimension 2 × 2 is
to be painted red completely ?

I am not able to approach this problem. Can this problem be solved by inclusion-exclusion principle.
Define sets $A,B,C$ as follows . . .
The goal is to find $|A\cup B\cup C|$.
Applying the principle of inclusion-exclusion, $$ |A\cup B\cup C| = \Bigl(|A|+|B|+|C|\Bigr) - \Bigl(|A\cap B|+|B\cap C|+|C\cap A|\Bigr) + |A\cap B\cap C| $$ Then we get
hence $$ |A\cup B\cup C| = 3{\,\cdot\,}2^4-(2{\,\cdot\,}2^2+2)+1 = 39 $$