First find the annual net cash flow for each machine:
Machine A: $45,000 - $15,000 = $30,000
Machine B: $60,000 - $20,000 = $40,000
Machine C: $85,000 - $44,000 = $41,000
Now discount those annual cash flows at 8% and subtract the original cost. For Machines B and C, also include the present value of the salvage value at the end.
Machine A
PV of cash flows = $30,000 × 3.99271 = $119,781
NPV = $119,781 - $150,000
NPV = -$30,219
Machine B
PV of cash flows = $40,000 × 4.62288 = $184,915
PV of salvage value = $9,000 × 0.63017 = $5,671
NPV = $184,915 + $5,671 - $186,000
NPV = $4,587
Machine C
PV of cash flows = $41,000 × 4.62288 = $189,535
PV of salvage value = $18,000 × 0.63017 = $11,343
NPV = $189,535 + $11,343 - $198,000
NPV = $2,878 (approximately)
Machine B should be purchased because it has the highest NPV.