Lets consider there were $1000$ people who took the cancer test. Out of which $1$%$ \to 10$ actually had cancer. According to the data - the test was $+ve$ for $90$% of the cancerred patients i.e the test was positive for $9$ and $-ve$ for $1$ who actually had cancer.
Also we know $10$ people had cancer and $990$ didn't so, $5$% of this 990 were detected $+ve$ having cancer i.e $49.5$ were detected $+ve$ and remaining $990-49.5$ were $-ve$.
We have collected the statistics now - we need to find probability of actually cancerred patients given they were diagnosed $+vely$. Let $A$=Patient having Cancer & $B$ = They were diagnosed $+vely \therefore$ $P(A/B) = P(A$$\cap$$B)/P(B)$.
$P(A$$\cap$$B)$ = (Count of people who actually had cancer and were diagnosed $+vely \to 9$)/(Total count $\to 1000$.)
$P(B)$ = (Count who was diagnosed $+vely \to 9+49.5$)/(total count $\to 1000$).
Substituting the values we get $P(A/B) = P(A$$\cap$$B)/P(B)$ = $$9/(9+49.5) = 0.153$$