Consider the coordinates of $A$. Sub. $x=0$ into $x+3y=18$, we have
$\begin{array}{rcl}
(0) + 3y & = & 18 \\
y & = & 6
\end{array}$
Therefore, $A=(0,6)$.
Consider the coordinates of $B$.
$\left\{ \begin{array}{ll}
x+3y = 18 & \ldots \unicode{x2460} \\
2x+y=16 & \ldots \unicode{x2461}
\end{array}\right.$
$\unicode{x2460}\times 2 – \unicode{x2461}$, we have
$\begin{array}{rcl}
5y & = & 20 \\
y & = & 4
\end{array}$
Sub. $y=4$ into $\unicode{x2460}$, we have
$\begin{array}{rcl}
x + 3(4) & = & 18 \\
x & = & 6
\end{array}$
Therefore, $B=(6,4)$.
Consider the coordinates of $C$. Sub. $y=0$ into $2x+y=16$, we have
$\begin{array}{rcl}
2x + (0) & = & 16 \\
x & = & 8
\end{array}$
Therefore, $C=(8,0)$.
Let $f(x,y)=3x-y+16$. Hence, we have
$\begin{array}{rcl}
f(0,6) & = & 3(0)-6+16 \\
& = & 10 \\
f(6,4) & = & 3(6) – 4 + 16 \\
& = & 30 \\
f(8,0) & = & 3(8) – 0 + 16 \\
& = & 40
\end{array}$
Therefore, the greatest value of $3x-y+16$ is $40$.