The graph of a function f crosses the x-axis at -1 and 3 and touches the x-axis at 5. Which equations could define this function? Select all that apply

Given:
The points where the graph crosses the x-axis are -1 and 3.
The point where the graph touches the x-axis is at 5.
The objective is to find the correct equation of the function.
Explanation:
The equation representing the point x = -1, crossing the x-axis can be represented as,
[tex]\begin{gathered} x=-1 \\ (x+1)=0_{} \end{gathered}[/tex]Similarly, the equation representing the point x = 3, crossing the x-axis can be represented as,
[tex]\begin{gathered} x=3 \\ (x-3)=0 \end{gathered}[/tex]Similarly, the equation representing the point x = 5, touching the x-axis can be represented as,
[tex]\begin{gathered} x=5,x=5 \\ (x-5)(x-5)=0 \\ (x-5)^2=0 \end{gathered}[/tex]By combining all the equations of the graph, the function can be represented as,
[tex]f(x)=(x+1)(x-3)(x-5)^2[/tex]Hence, option (B) is the correct answer.