The quirk of subf
There is no plain sub on PowerPC. What you get instead is subf, short for subtract from, and it ships with a catch: subf rD, rA, rB computes rD = rB - rA. The operands sit in the reverse order from what your gut expects.
Take a worked example, subf r3, r3, r4. Here rA is r3 and rB is r4, so the answer comes out as r4 - r3:
subf r3, r3, r4 # r3 = r4 - r3
blr
Your target wires the registers up differently. Run that same rD = rB - rA formula over it and you will land on the C expression it wants.
Your task
Write sub2, taking two ints, to reproduce the target assembly.