the traditional way:
Let x=amount invested at 2%, then (4200-x)=amount invested at 3%
We're given
0.02x+0.03(4200-x)=102
Solve for x:
0.03x-0.02x=126-102
0.01x=24 => x=2400
Hence 2400 invested at 2% and 1800 invested at 3%
Alternative:
4200 at 2%=84 4200 at 3%=126
Amt at 3%:Amt at 2%=102-84:126:102=18:24=(18/42)*4200:(24/42)*4200=1800:2400