Vertical stretch means y values are multiplied by 2, so 2f(x).
Translation of 5 units to the right, means x values minus 5 (it does the opposite to what you might think)
So overall g(x) = 2f(x-5) = 2(4(x-5)) = 8(x-5) = 8x-40
Vertical compression means y values are halved
3 units up mean y values plus 3
So ½h(x) + 3 = g(x) = ½(10x) + 3 = 5x + 3