Evaluate piecewise functions?

What formula will I use to substitute f(2)..?
3 answers 3