You need to append your values within the callback function. Right now, your the line of code after the two $.getJSON calls is firing before the JSON is finished downloading. That's why the first append is working. You have a timing issue.
To illustrate the timing, use alert messages like this...
$.getJSON('http://twitter.com/followers/ids.json?screen_name='+ query1 + '&callback=?', function(data) {
f1=data;
alert('Two');
$('#content').append('p'+f1[0]+'p');//this one is coming
});
$.getJSON('http://twitter.com/followers/ids.json?screen_name='+ query2 + '&callback=?', function(data1) {
f2=data1;
alert('Three');
});
alert('One');
$('#content').append('p'+f1[0]+'p');//this one is not coming...its showing Undefined