Step 1 :First, we find the maximum number of newspaper ads we can afford with the total budget, which is \(\lfloor 9730/140 \rfloor = 69\). However, we can only run 23 ads, so \(n = 23\).
Step 2 :Then, we subtract the cost of these ads from the total budget to find how much we have left for radio ads: \(9730 - 23*140 = 6730\).
Step 3 :Next, we find the maximum number of radio ads we can afford with the remaining budget, which is \(\lfloor 6730/370 \rfloor = 18\). However, we can only run 31 ads, so \(r = 18\).
Step 4 :Finally, we calculate the total number of potential customers reached: \(5100*23 + 6250*18 = 274500\).
Step 5 :\(\boxed{\text{So, the company should run 23 newspaper ads and 18 radio ads to maximize the number of potential customers reached, which is 274500 people.}}\)