When people work together, their work speeds add up. If someone finishes work in n days, they do n1 work per day.
B alone finishes work in 30 days.
B's work per day =301 of the total work
A and B together finish work in 12 days.
(A + B)'s work per day =121 of the total work
Since A and B's speeds add up:
A's work per day =121−301
Finding common denominator (LCM of 12 and 30 is 60):
121=605
301=602
A's work per day =605−602
A's work per day =603
A's work per day =201
If A does 201 work per day, then A needs 20 days to complete the whole work.
Therefore, A alone can finish the work in 20 days.