You are basically asking whether you can find positive integers $x_{1,2}$ such that
$$m_1x_1+c_1=m_2x_2+c_2$$
which is the same as
$$m_1x_1-m_2x_2=c_2-c_1.$$
If such positive integers exist, then the minimum is zero.
If not, you want to find smallest $d$ (smallest in absolute value) such that
$$m_1x_1-m_2x_2=c_2-c_1+d$$
has a solution.
The equation of the form
$$m_1x_1-m_2x_2=A$$
is a linear Diophantine equation and there is a simple way of saying whether there is a solution: It is true if and only if $\gcd(m_1,m_2)\mid A$. Solutions can be found using extended Euclidean algorithms.
This only gives you a solution $x_{1,2}\in\mathbb Z$. But since $m_{1,2}>0$, the solutions will be in fact non-negative.
See also:
The example you gave in the question leads to the Diophantine equation $$10x_1-3x_2=4,$$ which indeed has solution $x_1=1$, $x_2=2$.