Ok your question is a little ambiguous. Anyway I have assumed you want the following. You want the num1 to subtract automatically from num2 and be displayed in id='Answer'.
Following is the code to that in jQuery.
$(".sub").focusout(function() {
$("#answer").html('');
var num1 = $("#num1").val();
var num2 = $("#num2").val();
var answer = num1 - num2;
$("#answer").html(answer);
});
You can view the demo here
In case you want both input fields to subtract from 100. Following is the code.
$(".sub").focusout(function() {
$("#answer").html('');
var num1 = $("#num1").val();
var num2 = $("#num2").val();
var answer = 100 - num1 - num2;
$("#answer").html(answer);
});
And following is the link to demo
Based on your question in last comment. Download jquery from here. Now include the downloaded script in your header. Or just use the following code.
<script src="//code.jquery.com/jquery-1.11.0.min.js"></script>
After you have included jquery you need to use your .focusout code like stated below
<script type="text/javascript">
$(document).ready(function() {
$(".sub").focusout(function() {
$("#answer").html('');
var num1 = $("#num1").val();
var num2 = $("#num2").val();
var answer = 100 - num1 - num2;
$("#answer").html(answer);
});
});
</script>