选B翻译:当你的朋友有难时,你应该尽力去帮助他们。(When your friends are in trouble)是时间状语从句。后面从句还原:...do all (that) you can to help them,其中“that you can”是定语从句修饰“all”。“to help” 表示一种目的,作补语。
B, do (that) all you can 中,all you can是do 的宾语,that 可省略,to help them 是DO ALL YOU CAN 后面加的不定式!C 应改为 do that you can to helpD 应改为 what you can do to help希望能帮到楼主!