Let M = % of material retained
n = number of hours of sleep
p = number of hours partying
M varies directly as n2 and inversely as p.
So, M = kn2/p, for some constant, k.
M = 70 when n = 6 and p = 2, so 70 = k(6)2/2
70 = 18k
k = 70/18 = 35/9
Therefore, M = 35n2/(9p)
When n = 8 and p = 3, M = 35(8)2/27 ≈ 83