How to solve a complex fraction?