<PAGE>

                                                                    EXHIBIT 10.5
 
                   AMENDMENT NO. 3 TO STOCKHOLDERS AGREEMENT


     This Amendment No. 3 (the "Amendment") to the Stockholders Agreement (as
defined herein) is made and entered into as of July 2, 1998 by and among
Physicians Quality Care, Inc., a Delaware corporation (the "Company'), the
Investors and Class A Common Stockholders listed on the signature page hereof
("Class A Holders"). Capitalized terms not defined herein shall have the
meanings set forth in the Stockholders Agreement.

     WHEREAS, the Company, the Investors and certain holders of Class A Common
Stock are parties to a Stockholders Agreement (the "Stockholders Agreement"),
dated as of August 30, 1996, as amended on December 31, 1996 and June 23, 1997;

     WHEREAS, the Investors are purchasing 2,461,538 shares of Class L Common
Stock of the Company pursuant to a Class L Common Stock Purchase Agreement dated
the date hereof and as a condition thereto have required certain amendments to
the Stockholders Agreement;


     NOW THEREFORE, the parties agree as follows:

     1.   Section 1 of the Stockholders Agreement is hereby amended to add the
following:

          1.1.42.   "Class L Common" shall mean the Class L Common Stock, $.01
                     --------------                                           
          par value per share of the Company.

     2.   Section 1.1.9 of the Stockholders Agreement is hereby amended in its
entirety as follows:

          1.1.9.  "Common Stock" shall mean the Class A Common, the Class B
                   ------------                                            
          Common, the Class C Common and the Class L Common of the Company.

     3.   Section 1.1.36 of the Stockholders Agreement is hereby amended in its
entirety as follows:

          1.1.36.  "Qualified Public Offering"  shall mean the closing of a
                    -------------------------                              
          Public Offering with (i) the net proceeds of the sale of such Shares
          by the Company and any stockholder of the Company to equal or exceed
          $50,000,000 provided that the Investors shall have sold or shall be
          permitted to sell fifty percent (50%) of the capital stock into which
          the Class B Common Stock, Class C Common Stock and Class L Common
          Stock is convertible and the net proceeds of the sale thereof which
          would be permitted to be sold by the (A) Capital Investor shall equal
          or exceed seventy-five percent of the total amount invested in capital
          stock of the
<PAGE>
 
          Company by the Capital Investors up to $19,500,000, (B) the net
          proceeds of the sale thereof to the Bain Investors shall equal or
          exceed seventy-five percent of the total amount invested in capital
          stock of the Company by the Bain Investors up to $17,000,000 and (C)
          the net proceeds of the sale thereof to the Goldman Investors shall
          equal or exceed seventy-five percent of the total amount invested in
          capital stock of the Company by the Goldman Investors up to
          $16,500,000 and (ii) subject to a firm commitment underwriting
          conducted by a nationally recognized underwriter acceptable to a
          majority of the Class B Directors and Class C Directors, voting
          together as a single class.

     4.   Section 2.2 of the Stockholders Agreement is amended and restated in
its entirety as follows:

          2.2  Future Stockholders.  The Company agrees not to issue any shares
               -------------------                                             
          of capital stock (or any securities convertible, exchangeable or
          exercisable into shares of capital stock) to any person that is not
          party to this Agreement, unless such Person agrees to be subject to
          the provisions of this Agreement and shall be bound by and subject to
          the terms hereof, unless the Board, including a majority of the Class
          B and Class C Directors, voting together as a single class, approves
          the exclusions of such Person from being a party hereto.

     5.   Section 3.1 is amended to replace the last two sentences of the first
paragraph with the following:   Each holder of Class C Common hereby agrees to
cast all votes to which such holder is entitled in respect of a meeting of Class
C stockholders, by written consent or otherwise to elect as the Class C
Directors of the Company any two individuals who are designated to serve on the
Board by the Capital Investors.

     IN WITNESS WHEREOF, each of the undersigned has duly executed this
Amendment No. 3 (or caused this Amendment to be executed on its behalf by its
officer or representative thereunto duly authorized) under seal as of the date
first above written.

                         PHYSICIANS QUALITY CARE, INC.


                         By:_____________________________________

CLASS B AND C STOCKHOLDERS:

                         ABS CAPITAL PARTNERS II, L.P.

                            _____________________________________________
                         By:
 
                            ABS Partners II, L.L.C.,
                            its general partner
 

                                      -2-
<PAGE>
 
                            ______________________________________________
                         By:
                            Timothy T. Weglicki, Managing Member
 
                         _________________________________________________ 
                        
                         Russell Ray
                         115 Longwood Road
                         Baltimore, MD 21210
 
                         _________________________________________________

                         Steve Schuh
                         729 Heather Hill Lane
                         Hunt Valley, MD 21030
 
                         _________________________________________________

                         Dick Franyo
                         925 Drohomer Place
                         Baltimore, MD 21210
 
                         _________________________________________________ 

                         Christopher Camut
                         4405 Bedford Place
                         Baltimore, MD 21218
 
                         _________________________________________________ 

                         Harris Hyman IV
                         3131 O Street, N.W.
                         Washington, DC 20007
 
                         _________________________________________________

                                      -3-
<PAGE>
 
                         Brent Milner
                         5505 St. Alban's Way
                         Baltimore, MD 21212

                         _________________________________________________ 
 
                         Kathy Coffey
                         1800 Broadway, #301
                         San Francisco, CA 94109
 
                         _________________________________________________

                         Mark Klausner
                         7105 Charles Spring Way
                         Towson, MD 21204

                         _________________________________________________ 

                         Michael Singer
                         3048 Jackson Street
                         San Francisco, CA 94111
 
                         _________________________________________________
 
                         Stuart Smith
                         7834 Ellenham Road
                         Ruxton, MD 21204
 
                         _________________________________________________ 
 
                         Gary Lessing
                         10 Queensdale Place
                         London, England W11 4SQ
 
                         GS CAPITAL PARTNERS II, L.P.

                               By:  GS Advisors, L.P.
                                    Its General Partner

                               By:  GS Advisors, Inc.
                                    
 

                                      -4-
<PAGE>
 
                                    Its General Partner

                                  ________________________________________
                               By:
                               Title:
 

                               GOLDMAN, SACHS & CO., VERWALTUNGS
                               GMBH
 
                                       ___________________________________
                                    By:
                                      Managing Director
                                       ___________________________________
                                    By:
                                      Managing Director or
                                      Registered Agent
 

                               GS CAPITAL PARTNERS II OFFSHORE, L.P.

                                    By:  GS Advisors, II (Cayman), L.P.
                                          Its General Partner
 
                                    By:  GS Advisors II, Inc.
                                          Its General Partner
 
 
 
                               By:______________________________________
                                    Managing Director
 
 
 
 
 
                               THE GOLDMAN SACHS GROUP, L.P.
 
                                    By:  The Goldman Sachs Corporation

                                      -5-
<PAGE>
 
                                    Its General Partner
 
                                      ____________________________________
                                    By:
                                    Title:  Executive Vice President
 
 
                                    BRIDGE STREET FUND 1997, L.P.
 
                                    By:  Stone Street Asset Corp.,
                                         its Managing General Partner
 
 
                                    By:___________________________________
                                    Title:
 
 
                                    STONE STREET FUND 1997, L.P.
 
                                    By:  Stone Street Asset Corp.
                                         its General Partner
 
 
                                    By:___________________________________
                                    Title:
 
 
 
 
  
 
                                    BAIN CAPITAL FUND V, L.P.
 
                                    By:  Bain Capital Partners V, L.P., a
                                         Delaware limited partnership,
                                         its general partner
 

                                      -6-
<PAGE>
 
                                         By:  Bain Capital Investors V, Inc., 
                                              its general partner
 
                                       ___________________________________
                                    By:
                                    Title:  Managing Director
 
 
                                    BAIN CAPITAL FUND V-B, L.P.
 
                                    By:  Bain Capital Partners V, L.P., a
                                         Delaware limited partnership,
                                         its general partner
 
                                         By:  Bain Capital Investors V, Inc., 
                                              its general partner
 
                                       ___________________________________
                                    By:
                                      Title:  Managing Director
 
                                    BCIP Associates
 
                                       ___________________________________   
                                    By:
                                      Title:  a general partner
 
                                    BCIP Trust Associates, L.P.
 
                                       ___________________________________
                                    By:
                                      Title:  a general partner

                                      -7-
<PAGE>
 
          AMENDMENT NO. 3 TO STOCKHOLDERS AGREEMENT - SIGNATURE PAGES
                            PLEASE SIGN AND RETURN

CLASS A STOCKHOLDERS:



___________________________________________________________________________



___________________________________________________________________________



___________________________________________________________________________



___________________________________________________________________________



___________________________________________________________________________



___________________________________________________________________________



___________________________________________________________________________



___________________________________________________________________________



___________________________________________________________________________

                                      -8-