(a) So the number of pixels in the border is:
(x + 2)(x + 2) - (x - 2)(x - 2) = x^2 + 4x + 4 - (x^2 - 4x + 4)
= 8x
(b) So when x = 5, (a) = 8 x 5 = 40
(c) It would be best to do this on some kind of graph paper: Draw a square which is 7 cm long and 7 cm wide (obviously it doesn't matter what size the squares are, I’m just using cm for convenience), then inside this box draw another box that is 3 cm long and 3 cm wide, then count how many square cm there are in the border area (the area between the big box and the small box). This will come to 40 pixels, just as in part (b)
(d) Simply place the value x = 500 into the original equation that you worked out, i.e.
no. of pixels = 8x = 8 x 500 = 4000