Yes, and that is what the answer has done. However you can only use 1/r is it is a constant cash flow. Here it is not constant and so the first 4 years have to be discounted individually, and then there is an inflating perpetuity from time 5 onwards so they have discounted using the dividend valuation formula.