In a \(3 \times 3\) grid, if a sum of the row is 12 and two of the numbers are 3 and 1, then determine the third number in a row.
 
Ans: