Welcome to Just Answer and thanks for your question. LeMat married Justine Sophie Lepretre, a daughter of Jean Lepretre and Marie Sophie Andry. Justine and Gen. P. G. T. Beauregard were cousins. That makes Beauregard and Lemat cousins-in-law.
Were they related thru the Lepretre or Andry family? Is Jean's Mother a Beauregard or Marie Sophie's Mother a Beauregard?
Neither mother was a Beauregard. Gustav Beauregard and Sophie Lepretre weren't first cousins. Trying to untangle Creole relationships is a handful, since relationships several times removed are still counted as "cousins."