@anna005,
This is pretty straightforward, you can do it by hand.
Year one: 5 dividend / 1.1 opportunity cost = 4.54 PV
Year two: 6 dividend / 1.1^2 oc = 4.96 PV
Year three: 7.2 dividend / 1.1^3 oc = 5.41 PV
Year four: 8.64 dividend / 1.1^4 oc = 5.90 PV
Year four: 10.37 dividend / 1.1^5 oc = 6.44 PV
So 27.25 total.
Not sure what formula you are using but it is ok to have negative numbers if your growth rate is higher than your opportunity cost. You end up with a negative number minus a bigger negative number so you get a positive.