You are welcome.
Let's take amat may max pain as an example. First, you pick a range, say [20.0, 22.5], and assume that the max pain, mp, is in that range.
Now, the gain from the calls:
2753 x (mp - 17.5) + 32342 x (mp - 20)
and the gain from the puts:
12913 x (22.5 - mp) + 2009 x (25 - mp)
The max pain is achieved when the gain from the calls equals to the gain from the puts, that is,
2753 x (mp - 17.5) + 32342 x (mp - 20) = 12913 x (22.5 - mp) + 2009 x (25 - mp)
Solving above equation gives you
mp = (2753 x 17.5 + 32342 x 20 + 12913 x 22.5 + 2009 x 25) / (2753 + 32342 + 12913 + 2009) = 20.4
Notice that if you pick the wrong range, the number you get from above formula will be outside the range. You simply pick another range and do the same calculation again.
Let me know if you have further questions.