The previous answer was quite lucid. I would suggest that the primary level of comparison would be that both poems attempt to articulate the African- American predicament. They both speak, quite powerfully, about what it means to be "different" in a culture of sameness. The articulation of this difference is of critical importance in both poems. Dunbar's reality is one steeped in deception to the outside world, and an arena where one creates facades to mask complete pain. It is conceived of a reality where assimilation and cultural identity is synonymous with agony and suffering. While this is a part of Hughes' description, this is not the only elements within it, as he evokes a reality that seeks to speak of the different elements of the deferment of dreams, such as anger, frustration, and the demand for change.
The reason for pairing these two poems isn't immediately clear to me, but I suppose the two poems are related in how they address a central theme: how do we (esp. "we" in reference to black people in the late 19th and early 20th centuries) respond to the painful parts of life?
In addressing this theme, both poems make heavy use of figurative language, but they don't always use the same literary elements. Dunbar's poem seems to rely more on metaphor (esp. in the central image of the mask) whereas Hughes' poem is structured around similes (all but one of the comparisons are introduced with the word "like").
The diction of the poems is very different and may be one point of contrast that you can develop. The vocabulary in Hughes' poem is simple and concrete in comparison to that of Dunbar's. Dunbar even uses the archaic form "thee."
A good point of comparison and contrast may be the form of the poems. Both poems use end rhyme, but Hughes' poem is much more loosely structured; it's written in free verse and doesn't use a clearly measured number of syllables per line. Read the lines of both poems aloud, slowly and clearly but in a natural speaking voice, and you'll hear the difference in form.