Theory of Machines GATE Example Problem 2