\[ \boxed { \left \{ {\frac {\rm d}{{\rm d}t}}x \left ( t \right ) + \left ( ax \left ( t \right ) +by \left ( t \right ) \right ) f \left ( t \right ) =g \left ( t \right ) ,{\frac {\rm d}{{\rm d}t}}y \left ( t \right ) + \left ( cx \left ( t \right ) +dy \left ( t \right ) \right ) f \left ( t \right ) =h \left ( t \right ) \right \} } \]
Mathematica: cpu = 0.007001 (sec), leaf count = 48 \[ \text {DSolve}\left [\left \{f(t) (a x(t)+b y(t))+x'(t)=g(t),f(t) (c x(t)+d y(t))+y'(t)=h(t)\right \},\{x(t),y(t)\},t\right ] \]
Maple: cpu = 0.670 (sec), leaf count = 1633 \[ \left \{ \left \{ x \left ( t \right ) ={1 \left ( {{\rm e}^{{\frac {1}{2 \,da-2\,bc} \left ( \sqrt {{\frac {-{a}^{2}+2\,da-4\,bc-{d}^{2}}{da-bc} }} \left ( da-bc \right ) + \left ( a+d \right ) \sqrt {-da+bc} \right ) \int \!f \left ( t \right ) \sqrt {-da+bc}\,{\rm d}t}}}{\it \_C2}\, \sqrt {-{\frac {{a}^{2}-2\,da+4\,bc+{d}^{2}}{da-bc}}}\sqrt {-da+bc}+{ {\rm e}^{-{\frac {1}{2\,da-2\,bc}\int \!f \left ( t \right ) \sqrt {-da+ bc}\,{\rm d}t \left ( \sqrt {{\frac {-{a}^{2}+2\,da-4\,bc-{d}^{2}}{da-b c}}} \left ( da-bc \right ) - \left ( a+d \right ) \sqrt {-da+bc} \right ) }}}{\it \_C1}\,\sqrt {-{\frac {{a}^{2}-2\,da+4\,bc+{d}^{2}}{da-bc}}} \sqrt {-da+bc}+\int \!-{\frac {bh \left ( t \right ) \left ( f \left ( t \right ) \right ) ^{2}-dg \left ( t \right ) \left ( f \left ( t \right ) \right ) ^{2}+ \left ( {\frac {\rm d}{{\rm d}t}}f \left ( t \right ) \right ) g \left ( t \right ) - \left ( {\frac {\rm d}{{\rm d}t}}g \left ( t \right ) \right ) f \left ( t \right ) }{ \left ( f \left ( t \right ) \right ) ^{2}}{{\rm e}^{-{\frac {\int \!f \left ( t \right ) \,{\rm d}t}{2} \left ( \sqrt {-{\frac {{a}^{2}-2\,da+4\,bc+{d}^{2}}{da- bc}}}\sqrt {-da+bc}-a-d \right ) }}}}\,{\rm d}t{{\rm e}^{{\frac {\int \!f \left ( t \right ) \,{\rm d}t}{2} \left ( \sqrt {-{\frac {{a}^{2}-2\, da+4\,bc+{d}^{2}}{da-bc}}}\sqrt {-da+bc}-a-d \right ) }}}-\int \!-{ \frac {bh \left ( t \right ) \left ( f \left ( t \right ) \right ) ^{2}-dg \left ( t \right ) \left ( f \left ( t \right ) \right ) ^{2}+ \left ( { \frac {\rm d}{{\rm d}t}}f \left ( t \right ) \right ) g \left ( t \right ) - \left ( {\frac {\rm d}{{\rm d}t}}g \left ( t \right ) \right ) f \left ( t \right ) }{ \left ( f \left ( t \right ) \right ) ^{2} }{{\rm e}^{{\frac {\int \!f \left ( t \right ) \,{\rm d}t}{2} \left ( \sqrt {-{\frac {{a}^{2}-2\,da+4\,bc+{d}^{2}}{da-bc}}}\sqrt {-da+bc}+a+ d \right ) }}}}\,{\rm d}t{{\rm e}^{-{\frac {\int \!f \left ( t \right ) \,{\rm d}t}{2} \left ( \sqrt {-{\frac {{a}^{2}-2\,da+4\,bc+{d}^{2}}{da- bc}}}\sqrt {-da+bc}+a+d \right ) }}} \right ) {\frac {1}{\sqrt {-{\frac {{a}^{2}-2\,da+4\,bc+{d}^{2}}{da-bc}}}}}{\frac {1}{\sqrt {-da+bc}}}},y \left ( t \right ) = \left ( {\frac {d}{2\,b}{\frac {1}{\sqrt {-{\frac { {a}^{2}-2\,da+4\,bc+{d}^{2}}{da-bc}}}}}{\frac {1}{\sqrt {-da+bc}}}}+{ \frac {1}{b} \left ( -{\frac {1}{2}}-{\frac {a}{2}{\frac {1}{\sqrt {-{ \frac {{a}^{2}-2\,da+4\,bc+{d}^{2}}{da-bc}}}}}{\frac {1}{\sqrt {-da+bc }}}} \right ) } \right ) {{\rm e}^{{\frac {\int \!f \left ( t \right ) \,{\rm d}t}{2} \left ( \sqrt {-{\frac {{a}^{2}-2\,da+4\,bc+{d}^{2}}{da- bc}}}\sqrt {-da+bc}-a-d \right ) }}}\int \!-{\frac {bh \left ( t \right ) \left ( f \left ( t \right ) \right ) ^{2}-dg \left ( t \right ) \left ( f \left ( t \right ) \right ) ^{2}+ \left ( {\frac {\rm d}{ {\rm d}t}}f \left ( t \right ) \right ) g \left ( t \right ) - \left ( { \frac {\rm d}{{\rm d}t}}g \left ( t \right ) \right ) f \left ( t \right ) }{ \left ( f \left ( t \right ) \right ) ^{2}}{{\rm e}^{-{\frac {\int \!f \left ( t \right ) \,{\rm d}t}{2} \left ( \sqrt {-{\frac {{a}^{ 2}-2\,da+4\,bc+{d}^{2}}{da-bc}}}\sqrt {-da+bc}-a-d \right ) }}}} \,{\rm d}t+ \left ( -{\frac {d}{2\,b}{\frac {1}{\sqrt {-{\frac {{a}^{2} -2\,da+4\,bc+{d}^{2}}{da-bc}}}}}{\frac {1}{\sqrt {-da+bc}}}}+{\frac {1 }{b} \left ( -{\frac {1}{2}}+{\frac {a}{2}{\frac {1}{\sqrt {-{\frac {{a }^{2}-2\,da+4\,bc+{d}^{2}}{da-bc}}}}}{\frac {1}{\sqrt {-da+bc}}}} \right ) } \right ) {{\rm e}^{-{\frac {\int \!f \left ( t \right ) \,{\rm d}t}{2} \left ( \sqrt {-{\frac {{a}^{2}-2\,da+4\,bc+{d}^{2}}{da- bc}}}\sqrt {-da+bc}+a+d \right ) }}}\int \!-{\frac {bh \left ( t \right ) \left ( f \left ( t \right ) \right ) ^{2}-dg \left ( t \right ) \left ( f \left ( t \right ) \right ) ^{2}+ \left ( {\frac {\rm d}{ {\rm d}t}}f \left ( t \right ) \right ) g \left ( t \right ) - \left ( { \frac {\rm d}{{\rm d}t}}g \left ( t \right ) \right ) f \left ( t \right ) }{ \left ( f \left ( t \right ) \right ) ^{2}}{{\rm e}^{{\frac { \int \!f \left ( t \right ) \,{\rm d}t}{2} \left ( \sqrt {-{\frac {{a}^{2 }-2\,da+4\,bc+{d}^{2}}{da-bc}}}\sqrt {-da+bc}+a+d \right ) }}}} \,{\rm d}t+ \left ( {\frac {{d}^{2}}{2\,b}{\frac {1}{\sqrt {-{\frac {{a }^{2}-2\,da+4\,bc+{d}^{2}}{da-bc}}}}}{\frac {1}{\sqrt {-da+bc}}}}+{ \frac {d}{b} \left ( {\frac {1}{2}}-{a{\frac {1}{\sqrt {-{\frac {{a}^{2 }-2\,da+4\,bc+{d}^{2}}{da-bc}}}}}{\frac {1}{\sqrt {-da+bc}}}} \right ) }+2\,{\frac {c}{\sqrt {-da+bc}}{\frac {1}{\sqrt {-{\frac {{a}^{2}-2\,d a+4\,bc+{d}^{2}}{da-bc}}}}}}+{\frac {1}{b} \left ( {\frac {{a}^{2}}{2}{ \frac {1}{\sqrt {-{\frac {{a}^{2}-2\,da+4\,bc+{d}^{2}}{da-bc}}}}}{ \frac {1}{\sqrt {-da+bc}}}}-{\frac {a}{2}} \right ) } \right ) {\it \_C1 }\,{{\rm e}^{-{\frac {1}{2\,da-2\,bc}\int \!f \left ( t \right ) \sqrt { -da+bc}\,{\rm d}t \left ( \sqrt {-{\frac {{a}^{2}-2\,da+4\,bc+{d}^{2}}{ da-bc}}} \left ( da-bc \right ) - \left ( a+d \right ) \sqrt {-da+bc} \right ) }}}+ \left ( -{\frac {{d}^{2}}{2\,b}{\frac {1}{\sqrt {-{\frac {{a}^{2}-2\,da+4\,bc+{d}^{2}}{da-bc}}}}}{\frac {1}{\sqrt {-da+bc}}}}+{ \frac {d}{b} \left ( {\frac {1}{2}}+{a{\frac {1}{\sqrt {-{\frac {{a}^{2 }-2\,da+4\,bc+{d}^{2}}{da-bc}}}}}{\frac {1}{\sqrt {-da+bc}}}} \right ) }-2\,{\frac {c}{\sqrt {-da+bc}}{\frac {1}{\sqrt {-{\frac {{a}^{2}-2\,d a+4\,bc+{d}^{2}}{da-bc}}}}}}+{\frac {1}{b} \left ( -{\frac {{a}^{2}}{2} {\frac {1}{\sqrt {-{\frac {{a}^{2}-2\,da+4\,bc+{d}^{2}}{da-bc}}}}}{ \frac {1}{\sqrt {-da+bc}}}}-{\frac {a}{2}} \right ) } \right ) {\it \_C2 }\,{{\rm e}^{{\frac {1}{2\,da-2\,bc} \left ( \sqrt {-{\frac {{a}^{2}-2 \,da+4\,bc+{d}^{2}}{da-bc}}} \left ( da-bc \right ) + \left ( a+d \right ) \sqrt {-da+bc} \right ) \int \!f \left ( t \right ) \sqrt {-da+b c}\,{\rm d}t}}}+{\frac {g \left ( t \right ) }{f \left ( t \right ) b}} \right \} \right \} \]