ROI: take current profit and divide it by opening investment at NBV (1st year: 0.4 / 5 = 8%, etc)
RI: annual profits are the same as in previos table for ROI. From this profit you need to deduct cost of capital (1st year: NBV of investment 5 millions multiply by cost of capital 10%: 5*10% = 0.5). Thus RI for the 1st year would be 0.4 – 0.5 = -0.1