I'm not sure you need that identity. I think you should apply the result of part (i) to the denominator. For the numerator just do something similar to what you did to show part (i) by breaking it up into two pieces - the parts where X_i = 0 and the parts where X_i = 1.