Dear Asif, to maximize the profit function we need take derivatives on both variables (Q1 and Q2) and then solve obtained system of two equations simultaneously. In economics the derivation of profit with respect to the output means the Marginal Product (MP). Now we set two marginal products equal to zero and find the extremum. In fact, we have Q2=-290, and I guess your profit function has a mistake.
Did not understand the answer of the above question Question #54147, please clarify it in easy way.