OK, I think you’re trying to solve a few problems here in one question. Let’s break it down.
You need to get a value from a text box. I’ll assume its called txtBox in the absense of any code, so you need to write:
double a = Double.parse(txtBox.Text);
You then need to perform your calculation. This needs to be written the other way around, for example:
result = a - b;
With limited source code it’s difficult to answer properly.