Let the number of shirts produced in the factory be $x$.
$15\%$ shirts are defective, then $85\%$ shirts will be non-defective.
- Defective shirts $=15\% \;\text{of}\; x =\frac{15}{100}x = 0.15x$
- Non-defective shirts $=\frac{85}{100}x = 0.85x$
$20\%$ of the rest are sold in the domestic market, then $80\%$ will be remaining
Now, $0.85 x \times 80\%=8840$
$\Rightarrow \frac{85}{100}x \times \frac{80}{100}=8840$
$\Rightarrow 85x \times 8 = 8840000 $
$\Rightarrow x = \frac{8840000}{85 \times 8} $
$\Rightarrow\boxed{x=13000}$
$\therefore$ The number of shirts produced in the factory is $13000$.
$\textbf{Short Method:}$
Let the number of shirts produced in the factory be $100$.
- Defective shirts $=15$
- Non-defective shirts $=85$
$20\%$ of $85$ sold in the domestic market.
- Shirts sold in the domestic market $=85 \times \frac{20}{100}=17 $
- Shirts left for export $=85-17=68$
Now,
- $68 \longrightarrow 8840$
- $100 \longrightarrow \frac{8840}{68}\times 100$
- $100 \longrightarrow 130 \times 100=13000$
$\therefore$ The number of shirts produced in the factory is $13000$.
Correct Answer $:\text{B}$