MPB 2025 Special Meeting Proxy Statement

Exhibit B October 31, 2024 William Penn Bancorporation 10 Canal Street, Suite 104 Bristol, Pennsylvania 19007 Ladies and Gentlemen: Mid Penn Bancorp, Inc. (“Mid Penn”) and William Penn Bancorporation (“William Penn”) desire to enter into, concurrently with or following the execution of this letter agreement (this “Agreement”), an Agreement and Plan of Merger (as the same may be amended from time to time, the “Merger Agreement”), pursuant to which, among other things, William Penn will merge with and into Mid Penn with Mid Penn surviving the merger (the “Merger”) pursuant to the terms and conditions of the Merger Agreement. Defined terms used but not otherwise defined herein shall have the meanings ascribed to them in the Merger Agreement. William Penn has required that, as a condition to its willingness to enter into the Merger Agreement and pursuant to Section 6.11 of the Merger Agreement, the undersigned shareholder of Mid Penn, being either a director or executive officer as of the date hereof, execute and deliver to William Penn this Agreement. The undersigned, in order to induce William Penn to enter into the Merger Agreement, hereby irrevocably (in his or her individual capacity and not as a director or officer of Mid Penn): (a) represents and warrants to William Penn that (i) the undersigned (A) beneficially owns (as such term is defined in Rule 13d-3 under the Exchange Act of 1934 (the “Exchange Act”)), and has the sole power to vote or to direct the voting of, all of the shares of Mid Penn Common Stock set forth below on the signature page hereto (the “Original Shares” and, together with any additional shares of Mid Penn Common Stock pursuant to paragraph (d) below, the “Shares”) (provided that the term “Shares” shall not include any securities beneficially owned by the undersigned as a trustee or fiduciary) free and clear of all Liens (other than Liens which do not affect the ability of the undersigned to vote the Shares), (B) does not beneficially own any shares of Mid Penn Common Stock over which the undersigned has the sole power to vote or direct the voting of other than the Original Shares, and (C) has the capacity to enter into this Agreement and that this Agreement is a valid and binding obligation enforceable against the undersigned in accordance with its terms, subject to bankruptcy, insolvency and other laws affecting creditors’ rights and general equitable principles, (ii) except pursuant hereto, there are no options, warrants or other rights, agreements, arrangements or commitments of any character to which the undersigned is a party relating to the pledge, disposition or voting of any of the Original Shares (other than Liens which do not affect the ability of the undersigned to vote the Original Shares) and there are no voting trusts or voting agreements with respect to the Original Shares, (iii) neither the execution and delivery of this Agreement nor the consummation by the undersigned of the transactions contemplated hereby will conflict with or result in a breach, or constitute a default (with or without notice of lapse of time or both) under any provision of, any trust agreement, loan or credit agreement, mortgage, lease or other agreement, instrument or law applicable to the undersigned or to the undersigned’s property or assets, and (iv) no consent, approval or authorization of any other party is required in order for the undersigned to enter into and perform his or her obligations under this Agreement; (b) agrees to (i) be present (in person or by proxy) at all Mid Penn Shareholders’ Meetings in order to be counted for the purpose of determining the presence of a quorum at such meetings, and (ii) vote or cause to be voted all such Shares (A) in favor of approval and adoption of the Merger, the Merger Agreement and the transactions contemplated thereby (including any amendments or modifications of the terms thereof approved by the Mid Penn Board of Directors), and (B) against (y) any action, proposal, transaction or agreement which could reasonably be expected to result in a breach of any covenant, representation or warranty or any other obligation or agreement of Mid Penn under the Merger Agreement or of the undersigned under this Agreement and (z) any action, proposal, transaction or agreement that could reasonably be expected to impede, interfere with, delay,

RkJQdWJsaXNoZXIy NTYwMjI1