We examine the wavefunctions and their scalar products of a one-parameter family of integrable five vertex models. At a special point of the parameter, the model investigated is related to an irreversible interacting stochastic particle system the so-called totally asymmetric simple exclusion process (TASEP). By combining the quantum inverse scattering method with a matrix product representation of the wavefunctions, the on/off-shell wavefunctions of the five vertex models are represented as a certain determinant form. Up to some normalization factors, we find the wavefunctions are given by Grothendieck polynomials, which are a one-parameter deformation of Schur polynomials. Introducing a dual version of the Grothendieck polynomials, and utilizing the determinant representation for the scalar products of the wavefunctions, we derive a generalized Cauchy identity satisfied by the Grothendieck polynomials and their duals. Several representation theoretical formulae for Grothendieck polynomials are also presented. As a byproduct, the relaxation dynamics such as Green functions for the periodic TASEP are found to be described in terms of Grothendieck polynomials.