Quadratic is a type of problem which deals with a variable multiplied by itself- an operation also known as squaring.
Solution:
Let’s consider that $B$ takes $x$ days to complete the piece of work.
So, B’s $1$ day work $=1/x$
Now, A takes $10$ days less than that of B to finish the same piece of work so, that is $\left( x-10 \right)$ days
⇒ A’s $1$ day work = 1/(x – 10)
Same work both working together for $12$ days, then
(A and B)’s $1$ day’s work $=1/12$
From the question, it’s understood that
A’s $1$day work $+$B’s $1$day work $=\frac{1}{x-10}+\frac{1}{x}$
$=\frac{1}{x}+\frac{1}{x-10}=\frac{1}{12}$
$=\frac{x-10+x}{x\left( x-10 \right)}=\frac{1}{12}$
⇒ $12\left( 2x-10 \right)=x\left( x-10 \right)$
⇒ $24x-120={{x}^{2}}-10x$
⇒ ${{x}^{2}}-10x-24x+120=0$
⇒ ${{x}^{2}}-34x-4x+120=0$
⇒ ${{x}^{2}}-30x-4x+120=0$
⇒ $x\left( x-30 \right)-4\left( x-30 \right)=0$
⇒ $\left( x-30 \right)\left( x-4 \right)=0$
Now, either $x-30=0\Rightarrow x=30$
Or, $x-4=0\Rightarrow x=4$
It’s clear that the value of $x$ cannot be less than $10$, so the value of $x=30$ is chosen.
Therefore, the time taken by $B$ to finish the piece of work is $30$ days.