Odd problems with Drupal 8.7.7 and drupal/jsonapi 2.4.0
Composer is showing those error messages because you are updating to Drupal 8.7.7 and the JSON:API module is a requirement the composer.json file contains. (That is why the error message says locked at 2.4.0, required as ^2.4.)

Since the module is now part of Drupal core (as the project page and the release notes for version 8.x-2.4 say), updating to Drupal 8.7.7 would cause the module version to be updated to 8.7.7. (The version of every Drupal-core module is the Drupal version.) That is not allowed from the composer.json file which, with a restriction like ^2.4, just allows versions that aren't higher than 2.

Editing the composer.json file to accept any version of that module would avoid those error messages.
There would still be the problem of having two versions of the module installed in two different directories. I would rather uninstall the module before updating Drupal, but I am not sure how it would possible to preserve the module settings.