The mean is the average of the values in a data set. What this means is you add all the numbers in a data set together, then divide them by how many numbers there were to get the mean. In an equation it looks like this:
#(x_1+x_2+x_3+...)/n=X#, where #x_1,x_2,x_3...# etc. Are the values in the data set, #n# is how many value there are, and #X# is the mean.
By converting your worded question into an equation, you get
#(1+8+5+2+x)/5=4#, where #x# is the number of goals James kicked in his fifth game. To find the answer, first we multiply both sides by 5 to get
#(1+8+5+2+x)/5*color(red)(5)=4*color(red)(5)#
#1+8+5+2+x=20#
#16+x=20#.
Then we subtract both sides by 16, to get
#16+x-color(blue)(16)=20-color(blue)(16)#
#x=4#, therefore the number of goals James scored in his fifth game was 4 goals.
I hope I helped!