Now let $a= \dfrac{2015-r}{q}$ and $b=q$. Then we have,
\[ p+q+r=a+b \]
with $q=b$, $r=2015-ab$ and $p=a+ab-2015$.
So now we've to actually find the minimum and maximum values of $a+b$.
As, $p>0$, $q>0$, $r>0$, we have,
$a+ab-2015>0$, $b>0$ and $2015-ab>0$
Or, $a+ab>2015$ and $2015>ab$
So, $a+ab>2015>ab$
So, we see that if 'a' is not a divisor of 2015, then 2015 is equal to exactly one of the terms (ab+1,ab+2,....ab+a-1). In other words, we can say that if 'a' is fixed and $2015=ab+k$, then,
$b=\dfrac{2015-k}{a}=\left \lfloor \dfrac{2015}{a} \right \rfloor$ [$b$ is an integer]
So, $b=\left \lfloor \dfrac{2015}{a} \right \rfloor$ if $a$ is not a divisor of 2015 and otherwise $b$ has no possible values.
So now our problem has been reduced to find the minimum and maximum values of $a+\left \lfloor \dfrac{2015}{a} \right \rfloor$ where $a$ is not a divisor of 2015.
Again as $ab=a.\left \lfloor \dfrac{2015}{a} \right \rfloor \approx 2015$, the sum $a+b$ gets bigger as the difference between $a$ and $b$ gets higher.
So, maximum value occurs when $a$ or $b$ is equal to 2 (1 is not possible as 1 divides 2015). Then we have,