It is possible that eradicating one form of discrimination will lead to eradication of the other. However, it is not necessarily the case that it will.
Both racism and sexism are examples of people having closed minds about some other group. They do not think that the other group is equal to them. This happens, in part, because they are not willing to consider the idea that their group is not superior. Therefore, a fight against one form of discrimination can help end the other. If white men, for example, start to think that women can be equal to them, they are opening their minds. This may make it easier for them to accept the idea that non-whites are equal to them as well. In such a case, eradicating sexism would help to eradicate racism.
However, history shows us that getting rid of one form of discrimination/prejudice certainly does not lead immediately to getting rid of the other. It is possible for white men (for example) to come to think that race is not that important even as they still think that gender is important. In other words, I can start to think that other males are as good as me while still thinking that all females are inferior to me.
Breaking down one kind of prejudice and discrimination can help to open minds and make it easier to eradicate other forms of prejudice. But this will not necessarily happen since a person can get rid of one prejudice and still hold on to others.