Answer
$160\ teeth$
Work Step by Step
The relationship of a gear system is:
(no. of teeth in A)(rpm of A) = (no. of teeth in B)(rpm of B).
Now, we have
$$
50\times 400=x\times 125\Longrightarrow x=\frac{50\times 400 }{125}=160\ teeth
.$$