Constructing a line segment which is the sum of given segments with compass and straightedge

(For assistance see www.mathopenref.com/constaddsegments.html)

1. Construct a line segment which is the sum of the segments p, q and r

2. Construct a line segment whose length is equal to the perimeter of the triangle below.