If you want to solve a math equation in Messages, type the problem into your text field, add the equals sign (=), and the solution will appear in the predictive text field over your keyboard.