Firstly, the queries, which perform joining the ships taken part in battles (Outcomes table) with the Ships table and Classes table accordingly, are being united. By the way, the predicate
o.ship NOTIN(SELECT name FROM Ships)
in the second query is apparently unwanted, because UNION will exclude all possible duplicates.
These joins are not just surplus, they are wrong, as the description of the database says that in the Outcomes table can be ships that are absent from Ships table. That is, if not the leading ship is found, which is absent from the Ships table and which satisfies the task terms, then it will not get into the resulting set of the aforecited query.
Secondly, the predicate
HAVINGCOUNT(o.ship) = 2
confines possible variants with only two ship battles. And why can't the ship take part in more than two battles? It was not obligatory sunk after it had been damaged. And he could participate in battles and before damage (for example, with result "ok"). Then, if in the following and the last battle of a ship she has been damaged, the query 3.4.3 will deduce this ship though it and does not respond conditions of the task.