Let’s draw the table for better understanding.
$$\begin{array}{|l|l|l|} \hline & \text{Hospital A} & \text{Hospital B} \\\hline \text{Patients admitted} & x & x+21 \\ \text{Average recovery time} & r+3 & r \\\hline \end{array}$$
Now,
- $x(r+3) = 200\quad \longrightarrow (1)$
- $(x+21)r = 152\quad \longrightarrow (2)$
From equation $(2).$
$\boxed{r=\frac{152}{x+21}}$
Put the value of $r$ in equation $(1).$
$\Rightarrow x\left(\frac{152}{x+21}+3\right) = 200$
$\Rightarrow x\left(\frac{152+3x+63}{x+21}\right) = 200$
$\Rightarrow x(3x+215) = 200(x+21)$
$\Rightarrow 3x^{2}+215x = 200x+4200$
$\Rightarrow 3x^{2}+15x-4200 = 0$
$\Rightarrow x^{2}+5x-1400 = 0$
$\Rightarrow x^{2}+40x-35x-1400 = 0$
$\Rightarrow (x+40)(x-35) = 0$
$\Rightarrow x=-40\;\text{(or)}\; x=35$
$\Rightarrow \boxed{x=35} \quad [\because \text{Number of patient can’t be negative}]$
$\therefore$ The number of patient admitted in hospital $\text{A}$ was $35.$
Correct Answer $:35$