Answer
$$ f(r) = \frac{-1}{2r^2}$$ $$ g(r) = \frac{-1}{3r^3}$$
Work Step by Step
Given$$ \mathbf{F}=\frac{\mathbf{e}_{r}}{r^{3}}$$
Since
$$ \nabla (f(r) )= f'(r) \nabla r= f'(r) \mathbf{e}_r$$
Then the potential function is
$$ f(r) = \frac{-1}{2r^2}$$
For $$ \mathbf{G}=\frac{\mathbf{e}_{r}}{r^{4}} $$
The potential function is
$$ g(r) = \frac{-1}{3r^3}$$