If both samples decompose when heated they cannot be elements, because elements don't decompose. As a matter of fact that is one of the definitions of an element--a substance that cannot be broken down into anything simpler by chemical methods.
Compounds that are the same have the same chemical and physical properties, so if one of the compounds is soluble in water, then both are soluble in water.
two different compounds.