Why does the difference amplifier formula not work in this case?
It seems the formula is not correct for this circuit but I don't
  understand why


That's not a differential amplifier.

To solve that circuit you can proceed in at least two ways (assuming ideal op-amp). Here are a few hints (you won't get the full solution):


Superposition. Null the two independent sources \$V_1\$ and \$V_2\$ one at a time, and then sum the two partial responses. By nulling \$V_2\$ you're left with an inverting amplifier; by nulling \$V_1\$, with a non-inverting amplifier.
Impose ideal op-amp conditions. Recall that an ideal op amp, when there is a feedback path from the output to the input, adjusts its output to have $$v_\mathrm{n}=v_\mathrm{p},$$ where \$v_\mathrm{n}\$ is the potential of the inverting input and \$v_\mathrm{p}\$ that of the non-inverting one. In your circuit, this implies \$v_\mathrm{n} = V_2\$. Knowing this, you can easily apply Millman's theorem at the inverting input (or Kirchhoff's laws, if you feel more comfortable), considering the circuit containing the sources \$V_1\$ and \$v_\mathrm{o}\$. Then solve for \$v_\mathrm{o}\$.