There are several approaches you can use to plot the graph. Two possible methods are offered below.
Look at each part of the piecewise function separately. Set up a table of values for each part, using its restricted domain. Plot each table of values separately. In a case where the endpoint is not included in the domain, you can pick values that are very close to the endpoint value. You may even consider checking what the value of the function would be at the given endpoint, locate it on the graph, and mark its existence with an open circle. This indicates that particular point is excluded from the graph.
Plot both graphs regardless of of the restricted domain for each part. Once this is done, examine the restricted domains and erase the graphs as necessary to make them meet the specifications.