Question 947823
The question part is too strange.  You want x for how many days and y for how much total cost for one dog.  <s>Trying to account for total cost should be neater, maybe smarter</s>.


Assigning different variables:
p, price per dog for 1 day
2 dogs, known
20 dollar, flat fee for 1 dog


FIVE DAYS
2*20+2*5*p=540


SEVEN DAYS
2*20+2*7*p=740


The five and seven day data MUST give the same price p for each dog each day.  If the two equations do not give equal values for p, then the problem description is bad.


SOLVING EACH EQUATION:
-
{{{2*5*p=540-40}}}
{{{10p=500}}}
{{{p=50}}}
-
{{{2*7*p=740-2*20}}}
{{{14p=700}}}
{{{p=700/14}}}
{{{p=(7*2*5*2*5)/(2*7)}}}
{{{p=50}}}
-
PRICE {{{highlight(highlight(p=50))}}}, dollars per day for each dog.



NOW you can use your other expected variables x and y for what you were asked:  to find A LINEAR EQUATION for cost for boarding a dog.
x, how many days
y, cost to board 1 dog for x days
-
FIXED cost of $20, and expect x to be from set of natural numbers  (or whole numbers, in case of less than one full day of boarding).
{{{highlight(highlight(y=50x+20))}}}
-
The price works as the slope.