First restrict yourself to solving something like:
(user input) Ax + By = C (use only 'x' and 'y' for variables to solve)
Remove all spaces so that you get:
Ax+By=C (this makes parsing easier since any MINUS in (Ax - By = C) becomes part of the coefficient)
Use the equivalent of (C function) strchr() to search for 'x' then 'y' and then '=' to get the values of A, B & C respectively (of course you will have to convert the ascii values of digits to plain numeric - your own atoi() or atof()).
You can then use determinants to solve. The following is just one link that provides step by step details - search google determinant equation 2X2:
"Determinants and Cramer's Rule for 2x2 Systems 1 | Coolmath.com