Variants of the Busemann-Petty problem and of the Shephard problem