We are ask to make a function composition, where we replace the value of "x" in the g-function by the value of "f":
Because the question asks for g(f), we have to replace the entire "f" function in any place where x appears in "g". In detail, g=x+5, then we have to replace the first term x, by the whole f=-x^2-1. So we got g(f)=f+5 or g(f)=(-x^2-1)+5, finally we break the parenthesis and add -1+5: g(f)=-x^2+4
Hence, the answer is -x^2+4