That can be achieved through JavaScript/jQuery.
The code will be similar to
<s c r i pt>
$(document).ready(function (){
$("#input_b").change(function() {
if ($(this).val() != "") {
$("#input_a").show();
}else{
$("#input_a").hide();
}
});
});
</s c r i p t>
* spaces added to the word "script" to avoid the portal interpreting as a script.