In an assembly line of a factory, which produces networking switching hubs, two robots are utilized. The first one (A) is able to produce 40 microchips per hour, whereas the second one (B) produces 30 microchips per hour. For a total production of 400 microchips, the two robots operated for 12 hours. How many hours did each robot work?

if the 12 hours is total, then

30/hr*timeA+ 40/hr*TimeB=400
and timeA+TimeB=12

30*(12-timeB)+40*TimeB=400
10timeB=400-360
timeB=4hrs
TimeA=8hrs

check: 8*30+4*40=240+160=400