I guess I based it on swimming behavior. When I saw the phalarope was in shallow water and picking at surface.
Ok look first at the bill. If it is about 2-3 inches long and straight and comes to a dull point. Look at the neck. Phalarope dark crimson/brown color.
Bill on stilt sandpiper 4-5 inches and has a pronounced downward droop. Look at the underparts and stilt should have transverse barring and will have longer legs (and is approximate size of a lesser yellowlegs.
Feeding behavior of sticks. It looks like it almost momentarily looks straight down before probing bill to feed.
I suggest googling both birds for photos of each.