No but a qualified no. The second pilot was a CPL so he's completely within his rights to accept payment for his services. Additionally, the second pilot did not log any time.
If the flight were done for expenses only for a complete stranger whom you have no further contact with after the...