Add an onchange
attribute to the apex:inputField
(Field1) that calls a JavaScript function when Field1 is changed to evaluate the value you want for Field2, e.g.:
function updateField2(field1val) {
document.getElementById(yourField2ID).value = field1val.value + 30;
}
<apex:inputField onchange="updateField2(this);" id="field1">
Take care in accessing VF elements from JavaScript, as it can be a little frustrating based on how Visualforce generates the HTML - you can either use $Component or use the generated element tree syntax.