Applying this:
x.((x y) x)
To this:
(p q)
Is written this way:
(x.((x y) x) (p q))
and reduces to this:
(((p q) y) (p q))