RSA Key Differences (OpenSSL CLI vs. OpenSSL/ssl.h C function)
They're both in ASN.1 (DER) format, however they have different contents.

The OpenSSL version has an outer formatting that effectively states "this is an RSA public key", following by the actual raw public key key (which is listed as a 'bitstring' in the ASN.1 parse).  If you were to parse the bitstring as ASN.1, you'd see the public key, expressed as a sequence of two integers.

In contrast, the C program just has the ASN.1 raw public keyl that is, it's just a sequence of two integers, the values for $n$ and $d$.

The additional outer formatting included in the OpenSSL version accounts for the additional 25 bytes.