Writing an equation for a function after a vertical and horizontal translation