Use the slope-intercept form of a line:

y=mx+b

The xx-intercept represents point (−2,0) so by substitution,

0=m(−2)+b

2m=b(1)

The yy-intercept represents point (0,−(2/3)) so by substitution, -(2/3)=m(0)+b

-(2/3)=b

Solve for m by substituting (2) to (1): \(\displaystyle{2}{m}=-{\left(\frac{{2}}{{3}}\right)}\)

\(\displaystyle{m}=-{\left(\frac{{1}}{{3}}\right)}\)

Hence, the function is: \(\displaystyle{y}=-{\left(\frac{{1}}{{3}}\right)}{x}-{\left(\frac{{2}}{{3}}\right)}\)

or

\(\displaystyle{f{{\left({x}\right)}}}=-{\left(\frac{{1}}{{3}}\right)}{x}-{\left(\frac{{2}}{{3}}\right)}\)

y=mx+b

The xx-intercept represents point (−2,0) so by substitution,

0=m(−2)+b

2m=b(1)

The yy-intercept represents point (0,−(2/3)) so by substitution, -(2/3)=m(0)+b

-(2/3)=b

Solve for m by substituting (2) to (1): \(\displaystyle{2}{m}=-{\left(\frac{{2}}{{3}}\right)}\)

\(\displaystyle{m}=-{\left(\frac{{1}}{{3}}\right)}\)

Hence, the function is: \(\displaystyle{y}=-{\left(\frac{{1}}{{3}}\right)}{x}-{\left(\frac{{2}}{{3}}\right)}\)

or

\(\displaystyle{f{{\left({x}\right)}}}=-{\left(\frac{{1}}{{3}}\right)}{x}-{\left(\frac{{2}}{{3}}\right)}\)