Suppose I’m thinking of a function f(x) and I know that the slope of its graph at the point (x,f(x)) is given by e^(-4x). Suppose I also know that f(1)=e^-4. Find the formula for the function.

so you know that f'(x) = e^(-4x)

That means that
f(x) = -1/4 e^(-4x) + C
since f(1) = e^-4,
-1/4 e^-4 + C = e^-4
C = 5/4 e^-4
and so
f(x) = -1/4 e^(-4x) + 5/4 e^-4