A = event that the first ball is white
P(A given B) = P (A | B) = P(A and B) divided by P(B).
P(A and B) = (5/9) (4/8) = 20/72 = 5/18
P(B) is the sum of the two outcomes:
Outcome 1: First ball is white, Second ball is white P= 5/18
Outcome 2: First ball is not white, second ball is white P = (4/9) (5/8) = 5/18
So P(B) = 5/18 + 5/18 = 10/18 = 5/9
Then P(A|B) = (5/18) divided by (5/9) which gives 1/2.
So there is a 50% chance that, given that the second ball is white, the first ball is white as well.