endurance -
First define your variables:
m = the mean or average
n= how many tests had preceded the last test
Now, write down your equations:
Diane: (m*n + 97)/(n+1) = 90
Peter: (m*n + 73)/(n+1) = 87
Now, simplify by multiplying both equations by (n+1)
Diane: (m*n + 97) = 90n + 90
Peter: (m*n + 73) = 87n + 87
Now subtract one equation from the other and the m*n term will cancel out
Finally, simply solve for n=7
Hope that helps!