Attempt the question, check the explanation, and continue with similar questions to build confidence before exams.
They can be different
The dimensions must match except for the concatenation axis
Only one dimension must match
Both dimensions must be equal
Continue with nearby questions to strengthen the same chapter concept while you still have the context fresh in mind.