Beth runs a 10 mile race for charity. Contributors give money based on how far she runs. Everyone contributes $3 and a dollar for every mile she runs up to 5 miles. For every mile over 5 she runs contributors will pay an extra $2 a mile. Write the piecewise function that describes this situation.