Equations Help!

Hi
I want to make a project where flash solves equations. like 3x + 2x = 2 - 16
Is there any easy way to do this or is there a tuturial. And is it possible for flash to show the work when it solves the problem.

Example

http://www.hostsrv.com/webmab/app1/MSP/quickmath/02/pageGenerate?site=quickmath&s1=equations&s2=quadratics&s3=basic

Thanks=)