In a certain Algebra 2 class of 21 students, 6 of them play basketball and 10 of them play baseball. There are 7 students who play neither sport. What is the probability that a student chosen randomly from the class plays both basketball and baseball?

easily done with Venn diagram

place x in the intersection of the basketball and baseball circles
label baseball only as 10-x
label basketball only as 6-x

then 10-x + x + 6-x + 7 = 21
-x + 23 = 21
x = 2