Hello, thank you for taking the time to post your question!
Both of these scenarios are examples of independent events! In scenario (a), the outcome of the first roll has no influence on the outcome of the second roll. Similarly in scenario (b), since the card has been replaced the 52 card deck has been restored to its original state. Meaning that the probability for any card will be the same on the second draw as it was on the first draw.
I hope that helps get you moving in the right direction! Feel free to reach out if you have any additional questions beyond that :)