f(x)=|x|+1

Let A(r) be the enclosed by the x axis, the line x=-2, the graph of the function f, and the line x=r for any r=>-2
A) Write A(r) as a piecewise function with its joints at r=0

Please walk me through each step i am really confused!!

As usual draw the graph.

Clearly for r < 0,
f(x) = -x + 1, so
A(r) = ∫[-2,r] -x+1 dx

For r > 0, we have f(x) as
-x + 1 for -2 <= x <= 0
x + 1 for 0 < x <= r
So,

A(x) = ∫[-2,0] -x+1 dx + ∫[0,r] x+1 dx
Both of those are easy to evaluate, so just plug and chug