Step-by-step explanation:
A cabbage juice is purple in color at pH = 7, which is also known as neutral pH.
And, cabbage juice will turn pink in color when an acidic medium is added to it. Therefore, when cabbage juice turns pink in soda then it means an acidic substance has been added to it.
On the other hand, cabbage juice will turn green in color when a basic medium is added to it. Therefore, when cabbage juice is green in the soapy water then it means soapy water is the basic medium.
Thus, we can conclude that soapy water is the basic substance.