When the price of one good rises and the demand for another good also rises, they are substitutes. Consumers switch away from the costlier coffee to tea. Hence tea and coffee are substitute goods. Complementary goods show the opposite relationship (both move in opposite directions).