JSFiddle - React, Tailwind, and code Playground
HTML
<input type='text' id='input1'>
<input type='text' id='input2'>
CSS
#lc { background: #eeeeee; margin-bottom: 5px; width: 200px; border: 1px solid #bbbbbb; }
#edit { width: 200px; border: 1px solid #bbbbbb; }
JavaScript
$('input#input2').hide();
$('input#input1').keyup(function() {
$('input#input2').show();
var input1 = $('#input1').val();
$('#input2').val( input1 - 2 ); // Use any equation here
if( input1 == '' ) {
$('input#input2').hide();
}
});