There should be another part of this question because p could be any number. All you have to do is solve for p and divide the answer that you got by 6.
317/8 =39.625 It is impossible to divide 317 equally into 8 bowls The fairest way to distribute the marbles would be to have 39 in three bowls and 40 in the five other bowls.