\(3a-b=3m\Rightarrow b=3a-3m\)
\(\Rightarrow2a+\left(3a-3m\right)=7m\Rightarrow5a=10m\Rightarrow a=2m\)
\(\Rightarrow b=3a-3m=6m-3m=3m\)
\(\Rightarrow P=\frac{\left(2m\right)^2-2.2m.3m}{\left(2m\right)^2+\left(3m\right)^2}=\frac{4m^2-12m^2}{4m^2+9m^2}=\frac{-8m^2}{13m^2}=\frac{-8}{13}\)