When one guarantees payment on somebody's loan, even when the lender said "I will have the right to collect from either the borrower or the guarantor," he still cannot go to the guarantor if the borrow has apparent resources to pay. Only when the guarantor accepts a higher responsibility with the language like "give him the money, and I accept on myself the payment" can the lender go to the guarantor without attempting to collect from the borrower.
Rabban Shimon ben Gamliel says that even in that case the lender cannot do it, but this is one of the three cases where the law does not follow him.
Art: Quiringh Gerritsz. van Brekelenkam - Interior with a smoking and a drinking man by a fire