Two indefinite integrals with the same derivative lead to the same family of curves and so they are equivalent
quoting from my calculus book. ie. $$ \frac{d}{dx}\int f(x)dx=\frac{d}{dx}\int g(x)dx\implies\int f(x)dx\text{ and }\int g(x)dx\text{ are equivalent.} $$ This makes sense as if the derivative of two functions is equal then the functions are separated by a constant. But, using the property $\frac{d}{dx}\int f(x)dx=f(x)$, it seems to conclude that $f(x)=g(x)$
What am I missing here ?
You are not missing anything.
$$\int f(x)dx$$ simply means an antiderivative of $f(x).$
$$\frac{d}{dx}\int f(x)dx=\frac{d}{dx}\int g(x)dx\implies\int f(x)dx =\int g(x)dx +C$$
where C is a constant.
Also,
$$\frac {d}{dx}\int f(x)dx=\frac{d}{dx}\int g(x)dx \implies f(x)=g(x)$$