The question was what condition is required for $P$ and $Q$ to exist given $X$ and $Y$.
Since $P$ and $Q$ are defined by operations between $X$ and $Y$ we have to be sure those operations are well defined.
$$P=X+Y$$
$P$ is defined as the sum of $X$ and $Y$. These are matrices. The only way the can add is if they have the same number of rows and columns. This isn't particularly deep its just the rule/definition for adding matrices requires this. So if $X$ is an $m \times n$ matrix then so is $Y$.
$$ Q=X*Y$$
$Q$ is defined by the multiplication of $X$ and $Y$. What has to be true for this operation to be well defined? Look at the rule for multiplying matrices.
For the last part "what is the relations [between these matrices]", I feel that can mean a lot of things. The smart aleck answer would be to that the relationship is the equations. Nothing you can say about these will contain content not contained in the equations. This may require you to ask the writer of the question for clarification as to what they are looking for.