The Constitution provides for a direct successor to the President, the Vice-President. This is clear from the language first section of the 25th amendment:
In case of the removal of the President from office or of his death or resignation, the Vice President shall become President.
Additionally, the second section states:
Whenever there is a vacancy in the office of the Vice President, the President shall nominate a Vice President who shall take office upon confirmation by a majority vote of both Houses of Congress.
This makes it possible for a Vice President to take office between elections in the case of vacancy. This language also makes it clear that this nominee takes office when and if both houses of Congress confirm the nominee.
Furthermore the Constitution empowers Congress to do the following:
Congress may by Law provide for the Case of Removal, Death, Resignation or Inability, both of the President and Vice President, declaring what Officer shall then act as President, and such Officer shall act accordingly, until the Disability be removed, or a President shall be elected.
This clause is slightly modified by the 25th amendment in relation to how a disability is declared by the President and the acting of President by the Vice-President. However, generally, the language of the 25th amendment does not affect the relationship between the Presidency and those past the Vice-President in the line of succession.
According to the law the Speaker of the House and President Pro Tempore of the Senate are next in line to succeed the President, respectfully. However, the Constitution does not empower them to become the President. The Constitution only empowers them to become the “acting President”. Thus the Speaker and the President Pro Tempore only act as President. Thus in the vacancy of both President or Vice President, the Speaker would act as President. The Acting President would be entitled to exercise all duties of the President including nominating a Vice-President.
According to a CRS report on Presidential Succession, the Constitution specifically provides for the President or Vice President to “bump” the Speaker or any acting President out of office. Thus upon confirmation of the Vice Presidential appointee, the Vice President bumps the Speaker out and becomes President. This issue is pretty clear in the Constitution.
There is no requirement for Congress to confirm the Presidential nominee and there is a long history of the President being able to withdraw a nominee. However, this acting President need not withdraw the Vice Presidential nominee and upon confirmation that person would become Vice President and then President.
Politically, the Speaker would probably not appoint anyone because it would mean they were out of a job, unless there was some kind of agreement or similar. Maybe Congress would be okay with the acting President appointing themselves for stability and filling the line of succession, but self appointments and nominations are generally looked down upon. There is no history on the Presidency, but a similar situation is when there is a Senate vacancy, the Governor of the State can typically appoint a replacement. The Governors who appoint themselves typically do not win re-election to the Senate.