This confusion pops up often around here.
The problem usually comes down to insufficient consideration of units.
When you say "rate", what do you mean? It has units of mol per volume per second, e.g. $\mathrm{\frac{mol}{L\cdot s}}$. But that isn't enough information. You need to know moles of what.
First example: if the rate is defined as loss of A
For example, if you say that the "rate" means the disappearance of A, then the units of the rate are really $\mathrm{\frac{mol~of~A}{L\cdot s}}$. If so, then as long as:
- The reaction is $\ce{2 A->B}$; and
- The rate as you have defined it can be expressed by $r_A = k_1~[\ce{A}]^2$ ...
Then the rate of appearance of B will be $r_B = \frac{1}{2} k_1~[\ce{A}]^2$
Second example: if the "rate" is defined as appearance of B
If conversely you suppose that the "rate" refers to the appearance of B, then the units of rate are really $\mathrm{\frac{mol~of~B}{L\cdot s}}$, and if so, then as long as
- The reaction is $\ce{2 A->B}$; and
- The rate as you have defined it can be expressed by $r_B = k_2~[\ce{A}]^2$ ...
Then the rate of disappearance of A will be $r_A = 2 k_2~[\ce{A}]^2$
Third example: a totally separate definition of rate
You say its an elementary reaction. Let's say that we didn't know that and wrote the reaction as $\ce{200 A -> 100 B}$. The rate, according to this new example definition, is the rate of the reaction. The units of the rate are $\mathrm{\frac{mol~of~"reaction"}{L\cdot s}}$. If the reaction is still 2nd-order then the rate of the reaction will be $$r_r = k_3~[\ce{A}]^2$$
According to our reaction, 200 moles of A disappear for each mole of reaction, so $$r_A = 200 k_3~[\ce{A}]^2$$ and 100 moles of B appear, so $$r_B = 100 k_3~[\ce{A}]^2$$
Final thoughts
You will notice that I used different subscripts to distinguish between the $k$ values for the different assumptions. That's because they aren't equal to each other. The value of the "rate constant" $k$ depends on how you define the rate.
No matter how we define "the rate" and what we define as the stoichiometry (e.g. $\ce{2A -> B}$ or $\ce{A -> 1/2B}$ or $\ce{200 A -> 100 B}$, the rates must be equal. Therefore:
$$r_A = 200 k_3~[\ce{A}]^2 = 2 k_2~[\ce{A}]^2 = k_1~[\ce{A}]^2$$
That is,
$$ 200 k_3 = 2 k_2 = k_1$$
But no matter which way we decide to write it, it is still a second-order reaction because "the rate", no matter how we define it, is proportional to $[\ce{A}]^2$.