total 30 students .
A is in 8th position from top , B is in 5 ranks below A , B's position is ( 8 + 5) = 13 th position .
B’s rank from bottom is ( 30 - 13 + 1 ) = 17 + 1 = 18th position
1
2
3
4
5
6
7
8 A
9
10
11
12
13 B
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
The number of positions between 30 to 13 inclusive 13 is 18 .