Here, $x \in X$ and $A,B \in \mathcal{P}(X)$. So, $A, B \subseteq X$.
Now,
Case 1) : If $x \in A \cup B$, So, $f(x, A \cup B) =1 $. Here, $x \in A \cup B$ means, $x$ is either present in $A$ or $B$ but if $x$ is present in both $A$ and $B$ then we have to subtract the presence of $x$ in $A \cap B$ due to double counting.
So, $f(x, A \cup B) = f(x,A) + f(x,B) - f(x, A\cap B)$.
Now, for $f(x, A\cap B)$,
Sub-Case 1) : $x \in A\cap B$. It means $f(x,A\cap B) = 1$. Here, $x \in A\cap B$ means $x \in A$ and $x \in B$ which implies $f(x,A) =1$ and $f(x,B) =1$. So, $f(x, A\cap B) = f(x, A).f(x,B)$
Sub-Case 2) : $x \notin A\cap B$. It means $x \in (A \cap B)^c \Rightarrow x \in A^c \cup B^c \Rightarrow x \in A^c\; or\;x \in B^c \Rightarrow x \notin A \; or \; x \notin B $ which means both $f(x,A) =0 $ and $f(x,B) =0 $ and since, $x \notin A\cap B$. So, $f(x, A \cap B) = 0$. So, in this case also, $f(x, A\cap B) = f(x, A).f(x,B)$.
Hence, $f(x, A\cap B) = f(x, A).f(x,B)$.
So, $f(x, A \cup B) = f(x,A) + f(x,B) - f(x, A).f(x,B)$.
Case 2) : If $x \notin A \cup B$, So, $f(x, A \cup B) =0 $. Here, $x \notin A \cup B$ means, $x \notin A$ and $x \notin B$. So, $f(x,A) =0$ and $f(x,B) =0$. So, here in this case , also, $f(x, A \cup B) = f(x,A) + f(x,B) - f(x, A).f(x,B)$. is true.
Therefore, the option $(C)$ is correct.