P and O invested in a business. The profit earned was divided in the ratio 2 :3 . If P invested TK. 40000, the amount invested by Q is -