I have a function $f(x,y)$ of two variables. I also have the relationship $x = a + by$.
So, I can also write the function as $f(a+by, y)$.
I want to maximize this function in $y$. So I need to take the derivative and set it equal to zero, so that I can get my first-order condition.
But I am unsure how to do it in this case? Is there a general term for the derivative of $f(a + by, y)$ with respect to $y$?
If above does not have a general answer, does it help that $f(x,y)$ is additive, i.e. $f(x,y) = g(x) + h(y)$?
There's a general answer, but in your specific case $$ \frac{\mathrm{d}}{\mathrm{d}y} f(a + by,y) = \frac{\mathrm{d}}{\mathrm{d}y}g(a + by) + \frac{\mathrm{d}}{\mathrm{d}y} h(y) = bg'(a + by) + h'(y) $$ suffices.
Edit: in general, although this is a little harder to explain, we have, writing $f_x = \frac{\mathrm{d}}{\mathrm{d}x}f(x,y)$ and $f_y = \frac{\mathrm{d}}{\mathrm{d}y}f(x,y)$, that $$ \frac{\mathrm{d}}{\mathrm{d}y}f(a + by,y) = bf_x(a+by,y) + f_y(a+by,y). $$ Note that it reduces to the specific case when $f$ is of the form $f(x,y) = g(x) + h(y)$.