Residual Income

Question - When calculating residual income should I use cost of equity capital or return on equity? RI: NI - BVxKe

In that formula above use cost of equity. There’s another formula that uses both: RI = (ROE - r)*Bt-1