The arrow can be either horizontal or vertical or diagonal.
#
Horizontal Arrows:
y-coordinates of A and B will be same.
For any y-coordinate, their x-coordinates can be any of the following pairs (0, 5), (5, 0), (1, 4), (4, 1), (2, 6), (6, 2), (3, 8), (8, 3), (4, 9), and (9, 4).
So, for any y-coordinate 10 horizontal arrows are possible.
There are 10 possible y-coordinates.
Hence, total number of horizontal arrows = 10*10 = 100
#
Vertical Arrows:
By the same logic as above, total number of vertical arrows = 10*10 = 100
#
Diagonal Arrows:
To get a diagonal arrow of length 5, we have to form a right-angled triangle whose hypotenuse is 5. Only such triangle with integral coordinates must have the lengths of other sides as 3 and 4.
Refer to the figure below,

We can arrows with positive slope (red line) or arrows with negative slope (blue line)
Let us consider the arrows with positive slopes.
Note that for any particular bottom end point, we can have two diagonal line segments with positive slope of length 5 :
- A. base = 3, height = 4
OR
B. base = 4 and height = 3
So, if we fix the coordinate of the bottom endpoint, we will automatically get two diagonal line segments with positive slope of length 5.
For case A,
- The x-coordinate of the bottom end point can be any of the following : 0, 1, 2, 3, 4, 5, and 6
The y-coordinate of the bottom end point can be any of the following : 0, 1, 2, 3, 4, and 5
Possible number of diagonal line segments with positive slope of length 5 = 7*6 = 42
For case B,
- The x-coordinate of the bottom end point can be any of the following : 0, 1, 2, 3, 4, and 5
The y-coordinate of the bottom end point can be any of the following : 0, 1, 2, 3, 4, 5, and 6
Possible number of diagonal line segments with positive slope of length 5 = 6*7 = 42
A total of (42 + 42) = 84
Now, we can put the arrowhead in either end of the line segment.
Hence, total number of diagonal arrows with positive slope of length 5 = 2882 = 168
Similarly, there will be 168 diagonal arrows with
negative slope of length 5.
Hence, total number of possible arrows of length 5 = (100 + 100 + 168 + 168) = 536
The correct answer is E.