A graph is symmetric about the line y=x, if whenever the coordinates of a point (x, y) on the graph are switched,
the resulting point (y, x) would also be on the graph. This means that the transformed equation would be identical to the equation you start with.
Switch x and y in the equation and solve for y:
\(y=\frac{ax+7}{x-4}\) is transformed into \(x=\frac{ay+7}{y-4}\), which when solved for y, gives
\(x(y-4)=1(ay+7)\) (cross multiply),
\(xy-4x=ay+7\) (distribute),
\(xy-ay=4x+7\) (terms containing y on the same side),
\((x-a)y=4x+7\) (factor out y)
\(y=\frac{4x+7}{x-a}\) (divide by x-a)
This equation should be identical to the first equation; so we must have,
\(\frac{ax+7}{x-4}=\frac{4x+7}{x-a}\).
It is clear that we must have \(a=4\) for these rational expressions to be identical.