Note that there are 16 possible ways of selecting 2 bills out of the 4 bills with replacement.
(1,1), (1,5), (1,10), (1,20) ,... , (20,20)
Out of these 16 outcomes, 1 event refers to selecting both 5 dollar bill : (5,5) and 4 for the even that 2nd bill is 5: (1,5), (5,5), (10,5), (20,5)
P( both bills are $5 | 2nd bill is $5) = P( both bills are $5 and 2nd bill is $5) / P(2nd bill is $5)
= P (both bills are $5) /P( 2nd bill is $5)
= (1/16) / (1/4)
= 1/4 or 0.25
Intuitively, if the bills were sampled with replacement, then the independence of events could be assumed. And the problem will be equivalent to asking what the probability of selecting a 5 dollar bill on the first draw.