cmpe.py: Add ratio function

Simple algebraic solver as a shortcut for solving for one
unknown between equivalent ratios.

Signed-off-by: Nate Case <nacase@gmail.com>