After several days of hard work... I've created a program which will solve for x in the equation entered by the player. May your homework be ever easier.
credits to: Mamu10