This is because there is one card labeled "2" out of 8 cards total
-------
B = event of picking a number less than 6, given event A has happened
P(B) = 3/7
There are 3 cards less than 6 (those cards are labeled 3,4, and 5) out of 8-1 = 7 cards left over. We havent put the first card back so that's why 8 drops to 7. We also don't consider the "2" card. So that's where the 3/7 comes from.