Assume that we have the random variables X, Y and Z.
Suppose that X and Z are independent. This means that $$P(X=x, Z=z) = P(X=x) \cdot P(Z=z).$$
Also, suppose that Y and Z are independent, so $$P(Y=y, Z=z) = P(Y=y) \cdot P(Z=z).$$
With this information, can we say that $$P(X=x, Y=y) = P(X=x, Y=y | Z=z)?$$
$$\rule{18cm}{0.1cm}$$
My attempt
If we start from the second part of the equation we have $$P(X=x, Y=y | Z=z) = P(X=x | Z=z) \cdot P(Y=y | X= x, Z=z)$$
Now, $P(X=x | Z=z) = P(X=x)$, since X and Z are independent.
Likewise, $P(Y=y | X=x, Z=z) = P(Y=y | X=x)$, since Y and Z are independent (this is the step I am not sure about).
We can conclude that
$P(X=x, Y=y | Z=z) = P(X=x) \cdot P(Y=y | X=x) = P(X=x, Y=y)$
As is well known there exist events $A,B,C$ such that any two of them are independent but $P(A\cap B\cap C) \neq P(A)P(B)P(C)$. Take $X=I_A,Y=I_B,Z=I_C$ and $x=y=z=1$ to get counterexample.