First, all functions satisfy f(A1∩A2) contained in f(A1)∩f(A2).
Proof: If x is in f(A1∩A2) then there is an element a in A1∩A2 such that f(a) = x. Then a is in A1 and f(a)=x so x is in f(A1). And a is in A2 and f(a)=x so x is in f(A2). So x is in f(A1)∩f(A2).
It is the reverse containment that is not always true. In general it will require the function to be injective (one to one).
Proof: If x is in f(A1)∩f(A2) then x is in f(A1) so there is an element a in A1 such that f(a)=x. And x is also in f(A2) so there is an element b in A2 such that f(b) = x. Then f(a) = x = f(b). Since f is injective a = b. So a is in A1∩A2 and f(a) = x so x is in f(A1∩A2).
In fact if you know f(A1)∩f(A2) is contained in f(A1∩A2) for all sets A1 and A2 contained in the domain of f, then you can prove that the function is injective.
Proof: Suppose f(a) = f(b). Let A1 = {a} and A2 = {b}. Let x = f(a) = f(b). Then x is in f(A1) and x is in f(A2) so x is in f(A1)∩f(A2), which is contained in f(A1∩A2). Then f(A1∩A2) is nonempty so A1∩A2 is nonempty, i.e. {a}∩{b} is nonempty. But this is only true if a = b. So f is injective.
So the answer is that a function satisfies your equality for all sets A1 and A2 if and only if the function is injective.
Answers & Comments
Verified answer
First, all functions satisfy f(A1∩A2) contained in f(A1)∩f(A2).
Proof: If x is in f(A1∩A2) then there is an element a in A1∩A2 such that f(a) = x. Then a is in A1 and f(a)=x so x is in f(A1). And a is in A2 and f(a)=x so x is in f(A2). So x is in f(A1)∩f(A2).
It is the reverse containment that is not always true. In general it will require the function to be injective (one to one).
Proof: If x is in f(A1)∩f(A2) then x is in f(A1) so there is an element a in A1 such that f(a)=x. And x is also in f(A2) so there is an element b in A2 such that f(b) = x. Then f(a) = x = f(b). Since f is injective a = b. So a is in A1∩A2 and f(a) = x so x is in f(A1∩A2).
In fact if you know f(A1)∩f(A2) is contained in f(A1∩A2) for all sets A1 and A2 contained in the domain of f, then you can prove that the function is injective.
Proof: Suppose f(a) = f(b). Let A1 = {a} and A2 = {b}. Let x = f(a) = f(b). Then x is in f(A1) and x is in f(A2) so x is in f(A1)∩f(A2), which is contained in f(A1∩A2). Then f(A1∩A2) is nonempty so A1∩A2 is nonempty, i.e. {a}∩{b} is nonempty. But this is only true if a = b. So f is injective.
So the answer is that a function satisfies your equality for all sets A1 and A2 if and only if the function is injective.