This Python script works. But it can be used only in QGIS Python Editor. It is not a Processing script.
from PyQt5.QtCore import QVariant
# layers
P = QgsProject.instance().mapLayersByName("Posibility_Layer")[0]
S = QgsProject.instance().mapLayersByName("Stop_Layer")[0]
S.startEditing()
# add new fields
if S.fields().indexFromName('near_pl_id') == -1:
# field for polygonid of the nearest point
S.addAttribute(QgsField('near_pl_id', QVariant.Int))
if S.fields().indexFromName('near_ps_id') == -1:
# field for possibilityid of the nearest point
S.addAttribute(QgsField('near_ps_id', QVariant.Int))
for s in S.getFeatures():
# get points which have different polygon-id than the stop-point itself has
request = 'polygonid != ' + str(s["polygonid"])
distances = {p: s.geometry().distance(p.geometry()) for p in P.getFeatures(request)}
# get the feature which has the minimum distance value
nearest_point = min(distances, key=distances.get)
# you may need to change 'possibilit' as 'possibilityid', (character limit of shapefile)
s['near_ps_id'] = nearest_point["possibilit"]
s['near_pl_id'] = nearest_point["polygonid"]
S.updateFeature(s)
S.commitChanges()
Result: