Is this proof okay? (EDIT: is the claim even true?)
I claim: $f$ and $g$ have the same germ at $p$ if and only if they have the same derivations at the same point.
($f$ and $g$ has the same germ at $a$ if for $x$ in some neighborhood of $a$ we have $f(x)=g(x)$. A derivation (at $p$) is a map $X\colon C^\infty(M) \to \mathbb R$ satisfying the product rule $X(fg) = f(p)\cdot Xg + g(p)\cdot Xf$. It's established elsewhere that the set of all germs at $p$ and the set of all derivations at $p$ are vector spaces.)
First we show that if two functions have the same derivation, then they must have the same germ. We proceed throughout inside a neighborhood $W$ of $p$.
By linearity, two functions have the same derivation if it is true that $Xp(f-g)=0$. For $\mathtt X$ to be an actual derivation, it must hold that for any other function $k$ defined in $W$ $$ X [(f-g)\cdot k] (w) = k(w) \cdot X (f-g) (w) + (f-g)(w)\cdot X k(w) $$
The derivation of a function that is constant and equal to zero (i.e. $(f-f)$ for any $f$) must be zero everywhere. Therefore, the first term in the right hand side is zero. Moreover, $(f-g)(w) \cdot k(w) = 0$ whenever $(f-g)(w) = 0$, which makes the left hand side zero as well. This leaves $$ (f-g)(w)\cdot X k(w) = 0 $$ For this formula to hold for an arbitrary function $k$, we must have $(f-g)=0$ in $W$. Therefore these two functions have the same germ.
The converse may be shown by a contradiction argument. Let $f, g$ be functions with the same germ near $p$, but different derivations. Then, in a neighborhood of $p$ we have that $X(f) - X(g) = X(f-g) = c \neq 0$. But since these functions have the same germ, in a (possibly smaller) neighborhood of $p$ there must be $(f-g)=0$ and therefore $X(f-g) = 0$. Thus, two functions that have the same germ also have the same derivation near the same point.
No, the claim is not true.
It's not clear exactly what you mean when you say two functions $f$ and $g$ "have the same derivations at the same point." I can think of two possible interpretations for this phrase:
In any case, the statement you're trying to prove is false no matter which of these interpretations you had in mind.
If you use interpretation #1, then the statement is wildly untrue. For example, just take $M$ to be the real line, $p$ to be the origin, and consider the functions $f(x) = 0$ and $g(x) = x^2 +1$. Every derivation at $0$ is some constant multiple of the derivative operator $d/dx$. Because $f'(0)=g'(0)=0$, it follows that $f$ and $g$ satisfy condition 1, but they are not equal anywhere so they don't have the same germ at $0$.
If you use interpretation #2, the possibilities are more limited, but here's a counterexample: Again take $M=\mathbb R$ and $p=0$, but this time let $f(x)=0$ and $g(x)=1$. Now every derivation at every point gives the same result when applied to $f$ and $g$, but $f$ and $g$ are not equal anywhere.
What you can say is that if two functions satisfy condition #2, then their difference is locally constant; that is, on each connected component of $M$, there is a constant $c$ such that $f = g+c$.
I think the problem with your argument is that in both parts of the argument, you seem to be assuming that $f-g$ is identically zero in some neighborhood $W$. This is the correct assumption for the second part of the argument (same germ implies equal derivations), but by assuming this in the first part you've made your argument circular.