How do I spend a non-standard P2SH transaction
First thing I noticed was the redeemScript, it's using OP_MUL which is disabled and you won't be able to use it in scripts.
But I can show it using OP_ADD.

If you want to play with bcoin and test the scripts, how they validate you can use bcoin.script:

Verify and play with scripts

const scriptSig = new Script();
scriptSig.pushInt(6);
scriptSig.pushInt(1);
scriptSig.compile();


or you can assemble it using just string

const scriptSig = Script.fromString('OP_6 OP_1');


Now pubkeyScript  (redeemScript in P2SH)

const scriptPubkey = Script.fromRaw('935787', 'hex');


Or more verbose

const scriptPubkey = Script.fromString('OP_ADD OP_7 OP_EQUAL');


You can use bcoin.stack to run these scripts

const stack = new Stack();
scriptSig.execute(stack);
scriptPubkey.execute(stack);

// Verify the script was successful in its execution:
assert(stack.length === 1);
assert(stack.getBool(-1) === true);


Redeem transaction

Back to the question:

const redeemScript = Script.fromRaw('935787', 'hex');
const address = Address.fromScripthash(redeemScript.hash160());
const sendto = Address.fromString('sendtoaddress');

// generate script with redeem
const script = new Script();
script.pushInt(6);
script.pushInt(1);
script.push(Opcode.fromPush(redeemScript.toRaw()));
script.compile();


// We received some transaction
// lets say coinbase
const cb = new MTX();

// Add a typical coinbase input
cb.addInput({
  prevout: new Outpoint(),
  script: new Script()
});

cb.addOutput({
  address: address,
  value: Amount.fromBTC('5').toValue()
});

const coin = bcoin.coin.fromTX(cb, 0, -1);

// From here we spend the transaction
const spend = new MTX();

spend.addCoin(coin);
spend.addOutput(sendto, Amount.fromBTC('4.9999').toValue());

spend.inputs[0].script = script;

assert(spend.verify());

// You can broadcast raw transaction
console.log(spend.toRaw().toString('hex'));