You want the average value to be 5, so the variable c will satisfy ...
[tex]5=\dfrac{1}{c-1}\int\limits_{1}^{c}{3^{x}}\,dx\\\\5=\dfrac{3^{c}-3}{\ln(3)(c-1)}\\\\3^{c}-3-5\cdot \ln(3)(c-1)=0[/tex]
This mix of exponential and polynomial equation cannot be solved by algebraic means. A graphical solution gives ...
c ≈ 1.86236508674