In other words, both fields would be acting as an input field AND an output display field at the same time.
I don't have the exact script but I can give you the trick to making it work... put the conversion calculation in a custom format script of each field. The format script in A will set the value in B and vice versa. You want to add the code to the format script because that gets executed after the value has been validated and as long as you don't set a value to the format event, it won't effect the appearance of the value.
A bit tricky, but possible. Let's say these fields are called "Inches" and "MM".
Enter this code as the custom validation script of Inches:
this.getField("MM").value = event.value * 25.4;
And this code as the custom validation script of MM:
this.getField("Inches").value = event.value * 0.0393701;
Thanks so much, it worked!