31) A

Sum of upper row so far = 9 + 5 = 14
Value needed = 29 – 14 = 15
15 can only be made by (7 + 8) or (11 + 4). 12, 10 and 9 are already used in other rows.

Sum of lower row so far = 10 + 12 = 22
Value needed = 29 – 22 = 7
7 can only be made by (4 + 3). 5 and 6 are already used in other rows.

Since 4 definitely needs to be in the lower row, it cannot be in the upper row. So 7 and 8 definitely sit in the upper row.
If 8 sits in the top right corner and 4 sits in the bottom right corner,
Value of vertical row = 8 + 6 + 4 = 18
Value needed = 29 – 18 = 11
So 11 will sit above 6.

The seating plan would be like this:

5                            9                               7                              8

1                                                                                                                      11

2                                                                                                                       6

10                            3                               12                             4

The person sitting in front of 9 would be 3. So A is the answer.