a)
\(\left(x+3\right)\left(x^2-3x+9\right)-x^3\\ =\left(x+3\right)\left(x^2-3\cdot x+3^2\right)-x^3\\ =\left(x^3+3^3\right)-x^3\\ =x^3+27-x^3\\ =27\)
b)
\(\left(3x+y\right)\left(9x^2-3xy+y^2\right)-y^3-26x^3\\ =\left(3x+y\right)\left[\left(3x\right)^2-3x\cdot y+y^2\right]-y^3-26x^3\\ =\left(3x\right)^3+y^3-y^3-26x^3\\ =27x^3-26x^3\\ =x^3\)