<PAGE>
 
                                                                   EXHIBIT 10(r)


                          Dated as of August 7, 1997


Plains Marketing & Transportation Inc.
1600 Smith Street
Houston, TX 77002

     Re:  Amendment No. 5 to Uncommitted Secured
          Demand Transactional Line of Credit Facility
          --------------------------------------------

Gentlemen:

     Reference is made to that certain letter agreement outlining the parameters
of an uncommitted secured demand transactional line of credit facility dated
August 23, 1995 (as further amended to date and including all exhibits,
schedules and annexes thereto, the "Marketing Letter Agreement") among
BankBoston, N.A. (f/k/a The First National Bank of Boston) ("BKB"),
Internationale Nederlanden (U.S.) Capital Corporation ("ING"), Den Norske Bank
ASA, Comerica Bank-Texas, Wells Fargo Bank (Texas), National Association and
such other banks as may from time to time become parties thereto, (collectively,
the "Lenders") and BKB, as agent for the Lenders (in such capacity, the "Agent")
and Plains Marketing & Transportation Inc. (the "Borrower").  All capitalized
terms used herein without definition which are defined in the Marketing Letter
Agreement shall have the same meaning herein as therein.

     The Borrower, the Lenders and the Agent wish to amend certain terms of the
Marketing Letter Agreement as follows:

     1.    DEMAND LOAN SUBLIMIT.  Section 1(d)(ii) of the Marketing Letter
Agreement is hereby amended by (1) deleting the amount "$20,000,000" from the
first sentence thereof and substituting the amount "$25,000,000" therefor and
(2) deleting the phrase "ninety (90%)" from clause (y) of the first sentence
thereof and substituting the phrase "eighty percent (80%)" therefor.

     2.    PRICING.

     (a)   Clause (i) of the first sentence of Section 1(f)(i) of the Marketing
Letter Agreement is hereby amended by deleting the phrase "plus five-eighths of
one percent (5/8%) per annum".
<PAGE>
 
                                      -2-


     (b)   Clause (ii) of the first sentence of Section 1(f)(i) of the Marketing
Letter Agreement is hereby amended by deleting the phrase "two percent (2%)"
therefrom and substituting the phrase "one and one-half of one percent (1-1/2%)"
therefor.

     (c)   Section 1(f)(ii)(x) of the Marketing Letter Agreement is hereby
amended by deleting the percentage "1-1/2%" from clause (A) thereof and
substituting "1-1/8%" therefor and by deleting the percentage "1/4%" from clause
(B) thereof and substituting "0.1875%" therefor.

     3.    FINANCIAL AND OTHER GUIDELINES.  Schedule 4 to the Marketing Letter
Agreement is hereby amended as follows:

     (a)   paragraph (v)(C) of Schedule 4 is amended by deleting the text
thereof in its entirety and substituting the following therefor:

     "(C)  The aggregate of (a) crude oil pipeline inventory and (b) crude oil
           inventory in the Cushing Terminal shall not exceed, in the aggregate
           for both PMCT Inc. and Marketing, a maximum of 300,000 barrels.
           Notwithstanding the above, inventories in crude oil pipelines shall
           be limited to 225,000 barrels."

     (b)   paragraph (v)(D) of Schedule 4 is amended by deleting the text
thereof in its entirety and substituting the following therefor:

     "(D)  Inventory positions (other than fully hedged cash-and-carry positions
           which qualify under subsection (E) below) and positions which do not
           otherwise qualify under subsection (E) below shall be limited to
           fixed price time spreads for periods up to a maximum of twenty-four
           months for up to a maximum of 500,000 barrels, in the aggregate for
           both PMCT Inc. and Marketing, of crude oil hedged on the NYMEX."

     (c)   the following new paragraph (E) is inserted immediately following
paragraph (v)(D) of Schedule 4:

     "(E)  Cash-and-carry barrels shall be hedged on the NYMEX for delivery
           within the next 12 months."

     (d)   the first sentence of paragraph (xi) of Schedule 4 is amended by
inserting, immediately following the phrase "that certain Indenture dated as of
March 15, 1996 among Resources, certain subsidiaries of Resources and Texas
Commerce Bank National Association as 
<PAGE>
 
                                      -3-


Trustee, pursuant to which Resources issued 10 1/4% Senior Subordinated Notes
due 2006, Series A and Series B, in the aggregate principal amount of
$150,000,000" and before the period at the end thereof, the phrase "and that
certain Indenture dated as of July 21, 1997 among Resources, certain
subsidiaries of Resources and Texas Commerce Bank National Association as
Trustee, pursuant to which Resources issued 10 1/4% Senior Subordinated Notes
due 2006, Series C and Series D, in the aggregate principal amount of
$50,000,000".

     4.    SECURITY.  The Borrower hereby confirms that the reference to
"Marketing Letter Agreement" in the term "Marketing Obligations" as used in that
certain Security Agreement dated as of August 23, 1995 between Marketing and the
Agent includes the Marketing Letter Agreement as amended hereby and that
references to the Demand Loans and L/C's issued pursuant to the Marketing Letter
Agreement refers to all Demand Loans and L/C's issued pursuant to the Marketing
Letter Agreement, as amended hereby.

     5.    CONDITIONS PRECEDENT.  This Amendment shall become effective upon
receipt by the Agent of the following:

     (a)   a counterpart of this Amendment duly signed where indicated below by
each Lender, the Agent, the Borrower and Plains Resources Inc.;

     (b)   a counterpart of Amendment No. 5 to the PMCT Agreement duly signed
where indicated by PMCT, each Lender and the Agent;
<PAGE>
 
                                      -4-


     If you agree to and accept the foregoing amendment, please so indicate by
signing a counterpart of this letter and returning it to the Agent.  Upon
satisfaction of the conditions set forth in Section 5 hereof, this Amendment
shall take effect as a binding agreement among us, to be construed and
enforceable in accordance with the laws of The Commonwealth of Massachusetts.

                              PLAINS MARKETING &
                              TRANSPORTATION INC.


                              By:  /s/ MICHAEL R. PATTERSON
                              Name:   Michael R. Patterson
                              Title:  Vice President


                              BANKBOSTON, N.A.,
                              Individually and as Agent

                              By:  /s/ CHRISTOPHER C. HOLMGREEN
                              Name:   Christopher C. Holmgreen
                              Title:  Director


                              INTERNATIONALE NEDERLANDEN (U.S.) CAPITAL
                              CORPORATION

                              By:  /s/ CHRISTOPHER R. WAGNER
                              Name:   Christopher R. Wagner
                              Title:  Vice President


DEN NORSKE BANK ASA           DEN NORSKE BANK ASA

 
By:  /s/ WILLIAM V. MOYER     By:  /s/ BYRON L. COOLEY
Name:   William V. Moyer      Name:   Byron L. Cooley
Title:  First Vice President  Title:  Senior Vice President
<PAGE>
 
                                      -5-

                              COMERICA BANK-TEXAS

                              By:  /s/ DANIEL G. STEELE
                              Name:   Daniel G. Steele
                              Title:  Senior Vice President


                              WELLS FARGO BANK (TEXAS),
                                NATIONAL ASSOCIATION


                              By:  /s/ ANN M. RHOADS
                              Name:   Ann M. Rhoads
                              Title:  Vice President
<PAGE>
 
                                      -6-


                           RATIFICATION OF GUARANTY


     The undersigned Guarantor acknowledges and accepts the foregoing Amendment
and ratifies and confirms in all respects such Guarantor's obligations under the
Guaranty dated as of August 23, 1995 (the "Guaranty") executed and delivered by
the Guarantor to the Agent and the Lenders.  The undersigned Guarantor further
agrees that references in the Guaranty to the Resources Credit Agreement shall
be references to the Third Amended and Restated Credit Agreement dated as of
April 11, 1996 among the undersigned Guarantor, ING as agent and the lenders
named therein.


PLAINS RESOURCES INC.

        /s/
By:     Michael R. Patterson
Title:  Vice President