Given : n(AUB)=38 , n(A)=17 & n(B)=23
we know that,
n(AUB) = n(A) + n(B) - n(A intersection B)
38 =17 + 23 - n(A intersection B)
38 = 40 - n(A intersection B)
n(A intersection B) = 40-38 = 2
n(A-B) = n(A) - n(A intersection B)
n(A-B) = 17 - 2 = 15
n(B-A) = n(B) - n(A intersection B)
n(B-A) = 23 - 2 = 21
hope it helps :)