Use rational expression module and simplify
Merge pull request #46327 from petercollingridge/add-rat-exp2

Refactor to use rational expression module

Test plan: Make sure exercise still works

Auditors: alpert, eater