Let #y^2-Py-10# be #f(y)#.

Since #y-2# is a factor of #f(y)#, equate #y-2# to zero and make #y# the subject of the formula

# y-2=0#

# y=2#

Equate #f(y)# to zero and substitute for #y=2#

# y^2-Py-10=0#

# 2^2-2P-10=0#

# 4-10-2P=0#

# -6-2P=0#

Make #P# the subject of the formula

# -6-2P=0#

# -2P=6#

# P=6/(-2)#

# P=-3#