Some years ago, I had the same problem.
Since writing a robust parser is not a trivial exercise, I decided to not try it in TeX, but use Python (version 3.6 or later) instead.
The result was the TeXcalc module.
The input looks like this:
from texcalc import Calculation
c = Calculation()
c.add('rho_f', '1.62', 'g/cm^3', 'Fiber density')
c.add('rho_r', '1.2', 'g/cm^3', "Resin density")
c.add('v_f', '0.3', '-', 'Fiber volume fraction')
c.add('W_f', '450', 'g/m^2', "Area weight fibers", fmt=".0f")
c.add('t_f', 'W_f/(10000*rho_f)*10', 'mm')
c.add('t', 't_f/v_f', 'mm', "Laminate thickness")
c.add('t_r', 't-t_f', 'mm')
c.add('W_r', 't_f/10*(10000*rho_r)', 'g/m^2', "Area weight resin", fmt=".0f")
print(c)
It outputs an align* environment (from the amsmath package) and uses siunitx to typeset the units. After processing with LaTeX, the output looks like this.

Adapted to the MWE on request
The following are the contents of mwe.py
from texcalc import Calculation
c = Calculation()
c.add('b', 4)
c.add('a', 1)
c.add('c', 3)
c.add('x1', '(-b+sqrt(b**2-4*a*c))/2', 'cm', 'first root')
c.add('x2', '(-b-sqrt(b**2-4*a*c))/2', 'cm', 'second root')
print(c)
Run this as python3 mwe.py > foo.tex
This is mwe.tex:
\documentclass[preview=true]{standalone}
\usepackage{amsmath,siunitx}
\begin{document}
\input{foo.tex}
\end{document}
Run this with pdflatex mwe.tex.
This results in:

The goal of TeXcalc is to clarify complicated calculations that have multiple steps, as shown in the first example. This to make it easier for others to follow.
So it cannot exactly match your MWE, since it doesn't produce in-line math. Although in this case, you could extract the necessary data from foo.tex.
\timesinstead of*? – Diaa May 19 '19 at 01:04\def\cdot{*}%, which I added in the second example. – May 19 '19 at 02:51\def\times{*}%. – May 19 '19 at 03:25tikzmarmots. It does not produce precisely the same output, but is much more entertaining. ;-) More seriously, I can see that why folks are reluctant to write such a package. It will be (almost) inevitably fragile. So you spend 10 minutes on writing the core functions and 5 month on making it more robust. It is almost trivial to add the functions of section 94.3 Syntax for Mathematical Expressions: Functions of the pgfmanual 3.1.3 to the above parser but very hard to cope with all the ways users may typeset their expressions. – May 19 '19 at 04:14siunitxwill have the best chances of accomplishing this.siunitxdoes already a lot of related things and its maintainer presumably has a very good idea of what can go wrong. – May 19 '19 at 19:55