Approach: Fix \(r\) (a perfect square in range); then \(p+q = 900-r\) is fixed, and the constraint \(0.3q\le p\le 0.7q\) bounds \(p\). To make \(p\) as large as possible you want a small \(r\); to make \(p\) as small as possible you want a large \(r\). So check the smallest and largest valid squares.
Step 1: List the perfect squares with \(150 < r < 500\).
\(13^2=169,\ 14^2=196,\ \ldots,\ 22^2=484.\) Don't miss the endpoints \(169\) and \(484\).
Step 2: Turn the bound into a range for \(p\).
With \(S=p+q=900-r\), we have \(q=S-p\). The condition \(0.3q\le p\le 0.7q\) becomes:
Lower: \(p\ge 0.3(S-p)\Rightarrow 1.3p\ge 0.3S\Rightarrow p\ge \dfrac{0.3}{1.3}S=\dfrac{3}{13}S.\)
Upper: \(p\le 0.7(S-p)\Rightarrow 1.7p\le 0.7S\Rightarrow p\le \dfrac{0.7}{1.7}S=\dfrac{7}{17}S.\)
So for each \(r\): \(\dfrac{3}{13}S \le p \le \dfrac{7}{17}S,\ \ S=900-r.\)
Step 3: Maximum \(p\) — use the smallest \(r=169\).
\(S=900-169=731.\) Upper bound \(=\dfrac{7}{17}\times 731 = 301.\) This is an integer, and at \(p=301,\ q=430\) we get \(p=0.7q\) exactly (natural numbers). So \(p_{\max}=301.\)
Step 4: Minimum \(p\) — use the largest \(r=484\).
\(S=900-484=416.\) Lower bound \(=\dfrac{3}{13}\times 416 = 96.\) Integer, and at \(p=96,\ q=320\) we get \(p=0.3q\) exactly. So \(p_{\min}=96.\)
Step 5: Add the extremes.
\(p_{\max}+p_{\min} = 301+96 = 397.\)
\[\boxed{p_{\max}+p_{\min} = 397}\]