passes through origin, i.e. $(0,0)$
if you move 5 units up, it should pass through $(0,5)$
so you'll add 5 to $y$ i.e. $y+5=x^2$ this satisfies $(0,5)$
and to move right, it should pass through $(7,0)$ so you'll subtract $7$ from $x$ i.e. $y=(x-7)^2$
now combine both translations
$g(x)=(x-7)^2-5=x^2-14x+45$