You can use ##f(x)=a^x## with ##f(5)=a^5=32## and find ##a=2.## This is mainly by inspection.
We do not have enough information to uniquely determine ##f(x)##. All we know is that ##f(x)=a^{c\cdot x}## since these are all functions that satisfy the functional equation ##(*).## Hence, ## f(5)=32=2^5=\left(a^c\right)^5 \Longrightarrow 2=a^c## and all these functions are solutions. ##(a,c)=(2,1)## is only the easiest one.
Now, how do we know ##(*)##? Honestly, I am not sure. I would set ##f(x)=\sum_{k=0}^\infty a_k x^k## and try to figure out the coefficients ##a_k.## However, this requires that ##f(x)## can be written as a power series and I'm not sure whether this can be deduced only by the functional equation. I guess so, but I don't know the answer without trying.