Which of the equations of constant motion are you using?
You should be using this one:
v2f = v2i + 2ad
*vf = the final velocity (zero in this case)
*vi = the horizontal component of the initial velocity
*a = acceleration due to gravity
*d = distance traveled (8.7m)
Be sure you are determining the resultant velocity from the horizontal component (the above equation will help you solve for only the horizontal component) and you are squaring the values that need to be squared.