Let $S$ be a set and let $f$ be a function from $\mathcal P(S)$ to $\mathbb R$ such that for all $A,B\in\mathcal P(S)$ with $A\cap B=\emptyset$, $$f(A\cup B)=f(A)+f(B)$$ Show that for all $A,B\in\mathcal P(S)$, $$f(A\cup B)=f(A)+f(B)−f(A\cap B)$$
I have tried to do this but I didn't quite understand.