That question seems kinda curious and interesting for me. So, I'm trying to figured out what is lambda calculus is, find an answer and want to show it to OP (all hints have already been showed actually, spoiler alert).
Firstly, lets try to redefine f:
λ> let f = (\g x y z -> x^3 - g(x + g(y - g z) + g(z^2)))
f ::
  (Integer -> Integer) -> Integer -> Integer -> Integer -> Integer
So, we've got function, which get function and 3 numbers and return the answer. Using curring we can add g definition right here, like f_new = f g:
λ> let f = (\g x y z -> x^3 - g(x + g(y - g z) + g(z^2))) (\x -> 2*x^2 + 10*x + 1)
f :: Integer -> Integer -> Integer -> Integer
We're done. Let's check it:
λ> f 0 0 0
-13
The answer is correct.
UPD:
In those examples let is just a way to declare function in the interpreter, so final answer is:
f :: Num a => a -> a -> a -> a
f = (\g x y z -> x^3 - g(x + g(y - g z) + g(z^2))) (\x -> 2*x^2 + 10*x + 1)
     
    
f = flip flip ((1 +) . ap ((+) . (2 *) . (^ 2)) (10 *)) . (flip .) . ap ((.) . (.) . (.) . (-) . (^ 3)) (((ap id .) .) . flip flip (flip id . (^ 2)) . (liftM2 (liftM2 (+)) .) . (. ((ap id .) . (. flip id) . (.) . (-))) . (.) . (.) . (+)): f made pointless by lambdabot