Well first, when dealing with a point in an array, you need to use $, not @. ie:
until ($k==2) {
$averages[$k]=int(($scores[$i][$j]+$scores[$i][$j+1]+$scores[$
+i][$j+2]+$scores[$i][$j+3])/3);
$i++;
$j++;
$k++;
}
The above runs fine for me, granted I have no data and no idea what $i, $j and $k mean (though I can guess). So if the above doesn't help, we'll need more information, namely the values for $i, $j, $k up to this point and the expected output.
*Edit: I thought I would take a second and look at what you had and fill in some default values and unless you have major parts of this loop excluded for whatever reason, what you are doing doesn't make sense. First, $i, $j and $k are all set to the same values. You probably want nested for loops or something and if you provide more information on how your arrays are setup, we can help you more.