Here is a solved example:
When balancing the chemical equation: Fe2S3+O2=Fe2O3+SO2
The setup is a_*Fe2S3+b_*O2=c_*Fe2O3+d_*SO2
or : a_*(2Fe+3S)+b_*(2O)=c_*(2Fe+3O)+d_*(1S+2O)
This sets up : 2*a_=2*c_ and 3*a_=d_ and 2*b_=3*c_+2*d_
which has the solution : {a_,b_,c_,d_}={2,9,2,6}
Thus, 2*Fe2S3+9*O2=2*Fe2O3+6*SO2
—