Have you tried running a 3rd query?
from your result sets, set up a new variable
for instance based on the $querfriend sql statement.....
while ($row = mysql_fetch_array($result3)) {
$friend_id2 = $row['friend_id'];
}
So what this does is create a new variable $friend_id2. That variable will of course be the result of the query you have run above to get the friend_id.
Then create a 3rd Sql statement, this time based on $freind_id2 and show those results.
...select Picture from yourtable where friend_id = $friend_id2
This may not be the best way or most logical way or even the fastest way, but to me it's the easiest way I can grasp it and actually do it.