Lambda calculus simplification excercise
It is better to remind ourselves the Lambda calculus precedence rules first. See https://stackoverflow.com/q/4794330/9939883 for better details about precedence.
Application has higher precedence than Abstraction. Application is left associateive and Abstraction is right associative.
(λx.λy.y x) z (λw.w)

Since application has higher precedence,
(λx.λy.(y x)) z (λw.w)

Since application is left associative
= ((λx.λy.(y x)) z) (λw.w)

Applying repeated abstractions
= (λy.(y z)) (λw.w) 

= (λw.w) z

= z