The financial statement
I start off by looking at the next fixed assets which should be higher for company 1 who recently built a big office. This is consistent with P. Furthermore we want to see a high value in the item intangibles which would show underlying values of goodwill. I can see that O has a higher value which would imply that O is company 2.
We see that there is a big difference in stockholder equity between the two companies this can be a sign that the company with lower equity has invested in a project, like a new office. When i look at the ratios i see that P has a lower profit margin, which can be the result of fierce competition, consistent with company 1.