> 
> Doctors prescribed antacids (which reduce stomach acid) to patients
>  and instructed them to modify their lifestyle and eating habits, both
>  of which resulted in little success.
> 
> 
> 

Source:<https://brilliant.org/practice/skeptical-empiricism/?p=3>

I can understand the meaning of the sentence, but if I were to construct the sentence myself, my first attempt would be :

> 
> Doctors prescribed antacids to patients and instructed them to modify their lifestyle and eating habits, which **both resulted in little success.**
> 
> 
> 

My question is: 

1. Does my sentence contain grammar mistake? If so, what's the problem?
2. What's the name of the clause the original sentence used?