The idea of these types of questions/puzzles is to apply some Bayesian analysis and use the test result to update the probability that you are sick.
The people that got a positive test result are
- either sick and got a correct test result
- or not sick and got an incorrect test result.
The ratio of those two cases are the odds for being sick.
For example. Say 1 000 000 people do the test and the outcome is:
$$\begin{array}{}
& \text{sick} & \text{not sick} & \text{total} \\
\text{positive test}& 99 & 9999 & 10098 \\
\text{negative test}& 1 & 989901 & 989902\\
\text{total} &100 &999 900 & 1000000
\end{array}$$
Here we see that among the sick people 99% test positive and among the not sick people 99% test negative.
If you have a positive test then you are one of the 10 098 people with a positive test, but only 99 among those are truly sick. So you have $\frac{99}{10098} \approx 0.98\%$ probability of being sick.
So your problem is to make that table. Below this is done stepwise
Fill in the total amount of people $n$ (the actual value does not matter, it will drop from the equation eventually)$$\begin{array}{}
& \text{sick} & \text{not sick} & \text{total} \\
\text{positive test}& & & \\
\text{negative test}& & & \\
\text{total} & & & n
\end{array}$$
The prior distribution sick is $p=0.0001$, you can fill this into the totals $$\begin{array}{}
& \text{sick} & \text{not sick} & \text{total} \\
\text{positive test}& & & \\
\text{negative test}& & & \\
\text{total} & p n & (1-p) n & n
\end{array}$$
If you know the probability distribution of the test result/outcome given the state sick/not-sick, then you can fill in the rest of the table.
If a fraction $x$ of the sick people have a positive test $$\begin{array}{}
& \text{sick} & \text{not sick} & \text{total} \\
\text{positive test}& x p n & & \\
\text{negative test}& (1-x) p n & & \\
\text{total} & p n & (1-p) n & n
\end{array}$$
If a fraction $y$ of the non sick people have a negative test $$\begin{array}{}
& \text{sick} & \text{not sick} & \text{total} \\
\text{positive test}& x p n & (1-y) (1-p) n & \\
\text{negative test}& (1-x) p n & y (1-p) n & \\
\text{total} & p n & (1-p) n & n
\end{array}$$
We can complete the totals on the right $$\begin{array}{}
& \text{sick} & \text{not sick} & \text{total} \\
\text{positive test}& x p n & (1-y) (1-p) n & x p n + (1-y) (1-p) n \\
\text{negative test}& (1-x) p n & y (1-p) n & (1-x) p n + y (1-p) n\\
\text{total} & p n & (1-p) n & n
\end{array}$$
Then the probability to be sick given a positive test result is
$$\begin{array}{}
P(\text{sick} | \text{positive test}) &=& \frac{x p n }{x p n + (1-y) (1-p) n} \\
&=& \frac{xp }{xp + (1-y)(1-p) } \\
& = & \frac{x }{xp + (1-y)(1-p) }p
\end{array}$$
In your problem, it is only stated that the accuracy is 99%. This is not a very complete description. The detection can make two types of errors a sick person with a negative test, and a not sick person with a positive test. The ratios of these two can be different.
In some of these problem statements, it is plainly just stated that the accuracy is 99% (like in your problem/puzzle), and implied that the false positive and false negative rates are the same and 1%. This implication is not correct/accurate but if you ignore this error in the question then you can say $x = y = 0.99$ and solve the above equation
$$\begin{array}{}
P(\text{sick} | \text{positive test}) &=& \frac{x }{xp + (1-y)(1-p) }p \\
&=& \frac{0.99 }{0.99 \cdot 0.0001 + 0.01 \cdot 0.9999 } 0.0001\\
&=& \frac{0.99 }{ 0.010098 } 0.0001
& = & 0.009803922
\end{array}$$