It depends on the angle bwteen them. If they are in line then the magnitude of the resultant is just 20 + 40. However, if they are at right angles then the magnitude of their sum is √(202 + 402). For a general angle between them use the cosine rule.
.