Angel, I hope I am not too late!
Let's think about this. If I made $157 and gave away y dollars, then I have $(157-y) left, right? Just like if I said I gave away $2, then I have $(152-2) = $150 left.
Now, the problem says Imtaez has $(107 + y) left. If I had $109, then I could say I have $(107 + 2) left. Make sense?
An equation has an equal sign! Since both are what Imtaez has left, then they are equal. It's time to add the y back in.
$(157 - y) = $(107 + y)
We generally don't write the parentheses in like that, so you could just say $157 - y = $107 + y.
The problem doesn't ask for this, but since y represents one number, then Imtaez gave away $20, without even solving it. Why? Because what he gave away equals what is added to $107, so it has to be half the difference.
$157 - $20 = $107 + $20.
Hope this helps!