Explanation:
up/down shifts are easy. they just indicate a constant change to the calculated y-values (result values) of f(x).
a shift up is therefore just adding a constant to f(x).
a shift down is just subtracting a constant from f(x).
in our case that would be f(x) + 3 = x³ + 3.
left/right shifts are more difficult to understand.
a shift to the left means that the same y-/result values happen as for f(x) also for g(x), just a bit "earlier" (to the left) on the x-axis.
a shift to the right means via the same principle the y-values for f(x) happen unchanged but "later" (to the right on the x-axis) for g(x).
so, 5 units to the left means that g(x) has the same y-value as f(x+5). f(x+5) happens 5 units earlier (at x).
and so, the full g(x) is
g(x) = f(x+5) + 3 = (x+5)³ + 3 =
= (x² + 10x + 25)(x + 5) + 3 =
= x³ + 5x² + 10x² + 50x + 25x + 125 + 3 =
= x³ + 15x² + 75x + 128