PV cost for purchase or lease

I am stuck in completing the pv for the lease portion of this question, can someone please assist. Machine purchase $600,000 depreciating 4yrs straight line method book value $60,000 Market value $40,000 Bank loan at 16% Paymts fully amortized at end of each yr for 4 yrs Maint. costs $40,000 Lease downpayment $100,000 Annual lease pymts $170,000 At end of each yr for 4 yrs (5 pymts in total) Lease includes maint. IRR 25% Marginal tax rate 25% Marginal cost of capital 18% Thus far the calculations for the first part is : yr0 initial outlay $600,000 yr 1-4 maint costs $40,000 cost of capital 18% IRR 25% 25% of $600000 = $150000 Prov for depreciation = cost-residual/life of asset = 600000-40000/4 = $140,000 Profit before depreciation = $150,000+$140,000=$290,000 less maint cost = $250,000 Marginal tax rate 25% 25% of $250,000 = $62,500 Profit after tax = 250000 - 62500 = 187500 PV = yr 1 = 0.847*187500 = 158812.50 yr 2 = 0.718*187500 = 134625 yr3 = 0.609* 187500 = 114187.5 yr 4 - 0.516 * 187500 = 96750 PV = 504375 This is as far as I have reached.

Year 1: Depreciation Expense = 140 Interest Expense = 500 * .16 = 80 Principal Repayment = 170 - 80 = 90 PV of Lease for Yr 2: = 500 - 90 = 410 Year 2: Interest expense = 410 * .16 = 65.6 Principal repayment : 170 - 65.6 = 104.4 Year 3: PV of Lease : 410 - 104.4 = 305.6 and so on…

thanks