Let $f$ be a function, $A, A_1, A_2$ subsets of $X$ and $B, B_1, B_2$ subsets of $Y$.
Prove that if $f$ is one to one then $f(A_1-A_2)=f(A_1)-f(A_2)$.
This is what I have so far,
Proof: $\subset)$ Assume $y\in f(A_1-A_2)$. Then $\exists x\in A_1-A_2$ s.t $f(x)=y$. Since $x\in A_1-A_2$ then $x\in A_1$ and $x\notin A_2$. Hence, $y=f(x)\in A_1$ and $ y=f(x)\notin A_2$. Thus, $y\in f(A_1)-f(A_2)$ which proves $f(A_1-A_2)\subset f(A_1)-f(A_2).$
The backward way is where I'm stuck. I know this is where I'm supposed to use the 1-1 assumption but not really sure how.
Your proof is not correct. Let $y\in f(A_1-A_2)$. Then, there is $x\in A_1-A_2$ s.t. $y=f(x)$. In particular, $f(A_1-A_2)\subset f(A_1)$. If there is $u\in A_2$ s.t. $y=f(x)=f(u)$, by injectivity, $x=u$ and thus $x\in A_2$ what is a contradiction. Therefore $y\in f(A_1)-f(A_2)$.
For a counter example for $f(A_1-A_2)\subset f(A_1)-f(A_2)$, take $A_1=[-1,1]$, $A_2=\{1\}$ and $f(x)=x^2$. Then $f(A_1-A_2)=[0,1]$ and $f(A_1)-f(A_2)=[0,1[$.
For the converse, you don't need injectivity. Let $y\in f(A_1)-f(A_2)$. In particular, there is $x\in A_1-A_2$ s.t. $y=f(x)$. That prove that $y\in f(A_1-A_2)$.