Adding or removing to or from
Solution 1:
Your second version is probably more formal, but I think most people just accept that it's too cumbersome to use both prepositions. The sentence sounds most natural to me if you use the preposition appropriate for the last verb.
We wish to verify that adding or removing an apple from the basket does not alter its color.
Solution 2:
I would split your sentence in two separate pieces :
We wish to verify that adding an apple to the basket or removing one does not alter its color.