Final answer:
X has a charge of +3 and Y has a charge of 3- in the compound X2Y2.
Step-by-step explanation:
When the formula for a compound is represented by X2Y2 and the charge of Y is 3-, the charge of X can be determined by understanding the concept of charge balance in a compound. In this case, since Y has a charge of 3-, each Y atom contributes 3- to the overall charge. Therefore, since there are two Y atoms in the formula, their total charge is -6. In order for the compound to be neutral, the total charge contributed by X atoms must balance out the charge of Y atoms. Hence, each X atom must have a charge of +3 in order to cancel out the -6 charge from Y atoms. Therefore, the charge of X is 3+.