A translation of [tex]h[/tex] units upwards and [tex]q[/tex] units to the right is represented by the transformation
[tex](x,y)\rightarrow(x-q,y-h)[/tex]
So, to translate 5 right and 7 down, we need
[tex](x,y)\rightarrow(x-5,y+7)[/tex]
Now we just need to plug x=x-5 and y=y+7 in our equation (remember f(x)=y):
[tex]y+7=|x-5|\\y=|x-5| - 7[/tex]
The answer is
[tex]\boxed{g(x) = |x-5|-7}[/tex]