We claim that the solutions are f1(x)=x and f2(x)=−2x/3, for all real x.
Set x=y−3f(y) to obtain f(y−3f(y))=−2y, y∈Q. Replacing y with y−3f(y) in the initial equation gives f(x−6y)=f(x)−2y+2(y−3f(y)), hence f(x−6y)=f(x)−6f(y), for all x,y∈Q.
Set now x=y=0 to get f(0)=0 and replace x=6y to obtain f(6y)=6f(y), for all y∈Q.
We derived that f(x−6y)=f(x)−f(6y), which, for u=6y and v=x−6y, yields f(u+v)=f(u)+f(v), for all u,v∈Q. The solution of this classical functional equation is f(x)=xf(1), x∈Q.
On the other hand, by setting x=y=1 in the initial equation we obtain 3f2(1)−f(1)−2=0, hence f(1)=1 or f(1)=−2/3, thus proving our claim.