Let's denote the number of years as \( y \). The population growth for each city can be expressed as a linear equation. For City A:
\[ \text{Population of City A} = 156289 + 146y \]
And for City B:
\[ \text{Population of City B} = 151293 + 363y \]
To find when they have the same population, set the two equations equal to each other:
\[ 156289 + 146y = 151293 + 363y \]
Now, solve for \( y \) to determine the number of years it will take for City A and City B to have the same population.