1) You need to know the exact syntax of those expressions
2) Write a parser for them, store the result in a tree form
3) Write code to get the initial values from "x=2", "y=3"
4) Write code to simplify expression given input values
5) Write code to figure out the exact equation you're trying to solve
6) Solve the equation