The correct option is A 30
There 5 different things and both A and B have to get at least one.
So we can given A, 4 items in 5C4 ways and remaining 1 to B in 1 way. Similarly we can give A, 3 items in 5C3 ways and remaining 2 items to B in 1 way.
Hence, required number of ways =5C1+5C2+5C3+5C4=30