I see two problems in your worksheet.
1. The distribution corresponding to the RV MIXTURE is not correctly defined. It should be:
pdf := (p,x) -> p*PDF(U1, x)*Heaviside(x+3) + (1-p)*PDF(U2, x)*Heaviside(x-1);
cdf := (p,x) -> int(pdf(p,y), y=-infinity..x);
MIXTURE := p -> RandomVariable( Distribution( PDF = (x -> pdf(p,x)), CDF = (x -> cdf(p,x)), Conditions=[p >=0, p <=1] )):
2. It seems that Sample works only for distributions for which the support is an interval and the PDF is differentiable here.
The support of MIXTURE is (-3,-1) union (1,3).
[I don't know how to declare such a support, or even if it's possible].
So, Sample(MIXTURE(1/3), 10); will fail, but
Sample(MIXTURE(1/3), 10, method=[envelope, range=1..3]); # works.
Probably it's possible to use somehow method=custom.