Denote with $F$ the event that a robot is faulty, with $P(F)=\phi$ and with $T$ the event that it was tested faulty with $$P(T|F)=\delta$$ and $$P(T|F')=0$$ Thus according to the law of Total Probability the probability that a random robot is tested faulty is equal to $$P(T)=P(T|F)P(F)+P(T|F')P(F')=\delta\cdot\phi+0=\delta\cdot\phi$$ Now, if a robot was not tested faulty then the probability that it is nevertheless faulty is equal to $$P(F|T')=\frac{P(T'|F)P(F)}{P(T')}=\frac{(1-\delta)\phi}{1-\delta\phi}$$ Assume, now that $Y$ robots were found faulty, then $$E[X|Y]=Y+(n-Y)\cdot\frac{(1-\delta)\phi}{1-\delta\phi}=\frac{n\phi(1-\delta)+(1-\phi)Y}{1-δ\phi}$$ since according to the above calculations if there where $Y$ robots tested faulty, then these $Y$ are for sure faulty, and there is a$\frac{(1-\delta)\phi}{1-\delta\phi}$ probability that each of the remaining $n-Y$ robots that were not tested faulty, is actually faulty as well.