Hi @utkarsh-2000,
thanks for reaching out!
I found here an interesting post with a similar scenario, i.e. two separated peaks for which you want separated backgrounds. There it is shown how to isolate constant backgrounds as well as how to generalise to linear backgrounds.
I hope it helps!
Cheers,
Monica