No, the sentence does not use commas correctly.
It should be:
The company, which was started when the two founders were still in high school, has now posted a profit of almost two million dollars in the past year.
The commas here are being used to separate a non-essential phrase from the rest of the sentence.