P and Q start a business with initial investments in the ratio of 13 : 8. Their corresponding profits are in the ratio of 7: 5. If P invested his money for 7 months, find the time period for which invested his money.