eval to evaluate the equation.
answer.innerHTML = eval(finalAnswer);
Have a look at this answer as well. The question was about parsing a formula but it's pretty much usable for anything really.
var solve = '(3 + 7) + 2 * 8 / 2';! You would need a parser to actually solve that problem, like in this SO post.
You need to do more than that to solve the equations entered in a text box. Your current script only displays the content of the text box as is. You should use MathJS. It should help.