In a class test, the sum of the marks obtained by $\mathrm{P}$ in mathematics and science is 28 . Had he got 3 more marks in mathematics and 4 marks less in science, the product of marks obtained in the two subjects would have been $180 .$ Find the marks obtained by him in the two subjects separately.
In a class test, the sum of the marks obtained by $\mathrm{P}$ in mathematics and science is 28 . Had he got 3 more marks in mathematics and 4 marks less in science, the product of marks obtained in the two subjects would have been $180 .$ Find the marks obtained by him in the two subjects separately.

Let the marks obtained by $P$ in mathematics and science be $x$ and $(28-x)$, respectively. According to the given condition,

$\begin{array}{l}
(x+3)(28-x-4)=180 \\
\Rightarrow(x+3)(24-x)=180 \\
\Rightarrow-x^{2}+21 x+72=180 \\
\Rightarrow x^{2}-21 x+108=0 \\
\Rightarrow x^{2}-12 x-9 x+108=0 \\
\Rightarrow x(x-12)-9(x-12)=0 \\
\Rightarrow(x-12)(x-9)=0 \\
\Rightarrow x-12=0 \text { or } x-9=0 \\
\Rightarrow x=12 \text { or } x=9
\end{array}$

When $x=12$

$28-x=28-12=16$

When $x=9$

$28-x=28-9=19$

Hence, he obtained 12 marks in mathematics and 16 marks in science or 9 marks in mathematics and 19 marks in science.