Multiply the values across the rows. So you'll multiply each mark with its corresponding frequency
6*5 = 30
7*4 = 28
8*7 = 56
9*10 = 90
10*4 = 40
Then add up those results
30+28+56+90+40 = 244
Finally, you divide by 30 since this is the total number of scores (add up everything in the second column of the original table to get 30)
So we end up with the mean being 244/30 = 8.133 approximately
Round that value however you need to.