you have 3 separate sections - flights, return ticket and seat class. But you only ever loop though the flights. You need to collect values for of all of them, multiply them at the end and then display the result. If you are going to submit this as homework you should study it to see how it works...
Code:
function calculateCost() {
for (var i = 1; i < 7; i++) {
var radiobutton = document.getElementById("flight" + i);
if (radiobutton.checked == true) {
var base=radiobutton.value;
}
}
var rtn=document.getElementById("returnfare").checked?2:1;
for (var a = 1; a < 4; a++) {
var radiobutton = document.getElementById("seating" + a);
if (radiobutton.checked == true) {
var seatclass=radiobutton.value;
}
}
var cost=base*rtn*seatclass;
alert("The selected flight will cost $" + cost);
}