To export the Joomla database, you need to connect to the phpMyAdmin interface of your Joomla site and follow this procedure: https://codex.wordpress.org/Backing_Up_Your_Database
To import it on the WordPress database, you need to go to the phpMyAdmin interface of the WordPress site, click on "Import" and select the SQL file you have previously exported.