Assumming straightline depreciation, the depreciation per year is
D = 5000/5 = $1000 per year.
The book value is 5000  1000*3 = $2000
The initial investment is 5000.
The depreciation per year is $5000/5 = $1000,
The annual after tax cash flow is uniform and equal to: BTCF  (BFTC  Depr)*tax rate
1500  (1500  1000)0.4 = 1300.
The salvage at year 5 is 0.
The cash flow is in the table below.
Year

ATCF

0

5000

15

1300

5 Salvage

0

Compute the NPW of the ATCF
NPW = 5000 + 1300(P/A, 0.1, 5) = 72
We reject the investment in the machine. It does not return the MARR.
All would be the same except the after tax salvage in the 5th year. There would be a capital gain of 5000 at year 5, resulting in a capital gains tax of $2000. The net after tax salvage of $3000 should be used in the analysis.
The cash flow is in the table below.
Year

ATCF

0

5000

15

1300

5 Salvage

3000

Compute the NPW of the ATCF
NPW = 5000 + 1300(P/A, 0.1, 5)+ 3000(P/F, 0.1, 5) = 1791
We accept the investment in the machine. Its rate of return is greater than the MARR.
4. The SOYD = (5)(6)/2 = 15
D1 = 5000(5/15) = 1667
D2 = 5000(4/15) = 1333
ATCF1 =1500  (1500  1667)*0.4 = 1566.7
ATCF2 =1500  (1500  1333)*0.4 = 1433.3
The cash flow is a uniform series of 1567 with a decreasing gradient of 133
Year

BTCF

Depr.

Tax. Inc.

Tax

ATCF

0

5000


1

1500

1667

167

67

1567

2

1500

1333

167

67

1433

3 , 4, 5

1500

Grad. = 133


5 Salvage

0

BV = 0  0  0  0 
Compute the NPW of the ATCF
NPW = 5000 + 1567(P/A, 0.1, 5)  133(P/G, 0.1, 5) = 24
We accept the investment in the machine. Its rate of return is greater than the MARR.
Both methods of depreciation result in the same total taxes. The total depreciation in each case is (P  S), the initial investment minus the tax salvage. When an asset is sold prior to its tax life, the remaining book value is also taxed.
Although the total ATCF will be the same for the two cases, the ATCF will be greater in the early years for SYD method. The time value of money assures that money earned sooner is more valuable than money earned later.
Capital gain = [Actual Sale price  Book value  repair costs] = 4000  3000  200 = $800.
When salvage received is greater than the book value of the asset the difference is the capital gain. A tax must be paid on the gain. We normally assume that the tax rate for the gain is the ordinary income tax rate. The issue may be complicated by the tax law. When the salvage is less than the book value there is a loss, and the loss results in a tax savings (a negative tax).
Although depreciation is not a cash expense, it reduces net income by the depreciation amount to compute the taxable income. The depreciation results in a tax savings.
ATCF = BTCF  (tax rate)*(BTCF  Depreciation)
ATCF = BTCF( 1  tax rate) + tax rate*Depreciation
In this form we note that depreciation adds a positive amount to the ATCF. The higher the depreciation, the higher the after tax cash flow.
The deductible interest provides a tax savings of 3000*0.30 = $900. The cost of the house is reduced to $9100.