Gọi $t$ là nghiệm chung của 2 phương trình trên.
Dễ thấy: $t\ne0$.
Ta có: $t^2+at+12=0 \Leftrightarrow |a|=\left|t+\dfrac{12}{t}\right|$
$t^2+bt+7=0 \Leftrightarrow |b|=\left|t+\dfrac{7}{t}\right|$
Khi đó:
$A=\left|2t+\dfrac{24}{t}\right|+\left|3t+\dfrac{21}{t}\right|+2015$
$\ge\left|5t+\dfrac{45}{t}\right|+2015$
$\ge2\sqrt{5t.\dfrac{45}{t}}+2015=2045$
Vậy $\min A=2045 \Leftrightarrow \left[\begin{array}{l}t=3\\t=-3\end{array}\right.\Leftrightarrow \left[\begin{array}{l}a=7; b=\dfrac{16}{3}\\a=-7; b=\dfrac{-16}{3}\end{array}\right.$