Hey there!
Let's start with our initial value. Our initial value is 40 dollars, it is always added as it was how much was originally in our account.
So far, we have:
y = 40 + ??
Now, since we know that they deposit 18 dollars owe Monday or per week, we know what we can always multiply 18 by how many weeks there are to get how much additional money was added. We have:
y = 18w + 40
Hope this helps!