The following images shows the path that you configure:
If you configure to select the Contact -> Account and Case -> Account paths, the task first traverses to the Contact object and then traverses to the Case object.
If you apply filter with Account Name equals to Bank of New York, the task marks the corresponding ContactID in the Contact object based on the AccountID. For the selected ContactID in the Contact object, the task marks the corresponding Case ID in the Case object.