A piecewise function is basically a function that behaves differently at different domain intervals.
The given piecewise function is

As you can see, the function has a different expression for the interval x is less than or equal to 3 and a different expression for the interval x is greater than 3.
The easiest way to determine which graph corresponds to the given piecewise function is to evaluate the piecewise function at different values of x and graph it.
Evaluate the piecewise function for the interval x is less than or equal to 3.

Evaluate the piecewise function for the interval x is greater than 3.

Now, let us graph these points
As you can see from the graph, it matches with the graph of the 2nd option.
Therefore, the correct graph of the given piecewise function is the 2nd graph.