How do write this as a journal entry transaction?

Alex transferred $17,000 from his personal bank account to the corporation
in exchange for capital stock.

To write this as a journal entry transaction, you would follow the basic format of a journal entry, which includes the date, account debits, account credits, and a brief description of the transaction. Here's how you can write this particular transaction:

Date: [Insert Date]

1. Debit: Capital Stock
Credit: Personal Bank Account
Amount: $17,000
Description: Alex transferred $17,000 from his personal bank account to the corporation in exchange for capital stock.

In this transaction, you would debit the Capital Stock account to reflect the increase in the corporation's equity due to the investment made by Alex. On the other hand, you would credit the Personal Bank Account to show the decrease in Alex's personal bank account as a result of the transfer.

Please note that it's always a good idea to consult with an accountant or financial professional for accurate and precise journal entries specific to your business and jurisdiction.