a and b began business with rs . 7000 and rs . 15000 after 6 months , a advances rs . 3000 and b withdraws rs . 5000 . at the end of the year , their profits amounted to rs . 2940 find the share of a and b respectively .