Lambda Calculus Type Inference
Let me assume that you are asking about basic type inference for $\lambda$-calculus with parametric polymorphism a la Hindley-Milner (it's not entirely clear from your question). I would recommend the Types and Programming Languages textbook by Benjamin Pierce as a general reference for this sort of thing. In there you can look up parametric polymorphism and Hindley-Milner type inference. These are the buzzwords you should be Googling. And when you do, it should be easy to find many resources.

P.S. You should not reduce before type inference. You should just do type inference on the original terms.

Supplemental: to find out whether you're correct, and since you're going to do Haskell in your course, why not ask Haskell about the types?

GHCi, version 7.6.3: http://www.haskell.org/ghc/  :? for help
Prelude&gt; :t \g -&gt; \x -&gt; (g x) x
\g -&gt; \x -&gt; (g x) x :: (t1 -&gt; t1 -&gt; t) -&gt; t1 -&gt; t
Prelude&gt; :t \z -&gt; \x -&gt; x z
\z -&gt; \x -&gt; x z :: t1 -&gt; (t1 -&gt; t) -&gt; t


Yup, you were correct.