The sum of linear pair angles is 180° because, because a linear pair angles, are angles formed by two intersected lines and the angle of a straight line is 180°.
Then your first equation is:
n + p = 180°
The second equation can be formulated with the information given:
"angle n is 10 more than twice the measure of angle p."