Whom did Ruby Wax replace as the third flatmate in the television comedy 'Girls on Top'?

She didn't 'replace' anyone, she was in both series of the show. Tracy Ullman was in the first series, but didn't return for the second. The main cast were-

Dawn French (Amanda) eps 1-13

Jennifer Saunders (Jennifer) eps 1-13

Ruby Wax (Shelley) eps1-13

Tracy Ullman (Candice) eps1-7

Joan Greenwood (Lady Chloe Carlton). eps 1-13

In season 2, Candice was missing and the others all thought she was dead and they were to blame. It turns out that she had in fact left and was engaged to a rich man.