Legally speaking, is there any laws against a former president that has served 2 terms from being vice president?
The last sentence of the Twelfth Amendment to the United States Constitution states that
But no person constitutionally ineligible to the office of President shall be eligible to that of Vice-President of the United States. [source]
According to the Twenty-second Amendment to the United States Constitution
No person shall be elected to the office of the President more than twice, and no person who has held the office of President, or acted as President, for more than two years of a term to which some other person was elected President shall be elected to the office of the President more than once. [source]
This should legally forbid a former President that has served 2 terms (or more then 1 term and 2 years) from becoming Vice President.
The only correct answer to this question is that nobody knows, and it is unlikely that anyone will ever know. The phrasing of the Constitution and the intersection of Article II and the 12th and 22nd Amendments are ambiguous (as has been discussed in the comments on other answers), and so it would take a Supreme Court ruling to decide the issue. But because of the ambiguity, it is politically impossible for any two-term President to stand for election as Vice President (or be nominated to fill a vacancy), and so the Supreme Court will never be called upon to rule.
The Measures of eligibility to be President are detailed by Article II, seen below:
No Person except a natural born Citizen, or a Citizen of the United States, at the time of the Adoption of this Constitution, shall be eligible to the Office of President; neither shall any Person be eligible to that Office who shall not have attained to the Age of thirty five Years, and been fourteen Years a Resident within the United States.
These are extended to the Vice-President, via the 12th Amendment:
...But no person constitutionally ineligible to the office of President shall be eligible to that of Vice-President of the United States.
While the text of the 22nd Amendment, as understood in the language of the age in which it was drafted and the surrounding debate, stops an individual from being elected to a third term, or a 2nd term after serving a term and more than two years of a preceding term, it doesn't constitute an additional measure of eligibility.
No person shall be elected to the office of the President more than twice, and no person who has held the office of President, or acted as President, for more than two years of a term to which some other person was elected President shall be elected to the office of President more than once.
There is distinction between being eligible to hold the office and being elected to the office. As things stand, there isn't a Constitutional or legal hurdle stopping an individual for joining a ticket as the Vice-President.
The Constitution is the foundational document of the national government for the United States. It delineates how the government is constructed, who can be president, and who can be elected as president (with the 22nd Amendment). There is not a point, legislatively, beneath the Constitution that could constrain this matter; that is why it required an Amendment to detail term limits for the President, how the Vice President would be elected, and path of succession in case of disability. This stems from the Supremacy clause of the same document, Article VI, clause II.
This Constitution, and the Laws of the United States which shall be made in Pursuance thereof; and all Treaties made, or which shall be made, under the Authority of the United States, shall be the supreme Law of the Land; and the Judges in every State shall be bound thereby, any Thing in the Constitution or Laws of any State to the Contrary notwithstanding.