This is an application of the weighted arithmetic mean. The score of 95% gets a 20% weight (0.20), the score of 90% gets a 30% (0.30) weight, and the "rest of the class" gets the remaining 50% (0.50) weight. Let x = the average grade of the rest of the class:
(0.2)(95%) + (0.3)(90%) + (0.5)(x%) = 86%
19% + 27% + 0.5x = 86%
0.5x = 40%
Solve for x.
http://www.mathsisfun.com/data/weighted-mean.html