It’s not necessarily true if $A$ isn’t closed. Let $X=\Bbb R$. Then $X^*$ is homeomorphic to $S^1$, the unit circle in the plane. Let $A=(0,1)$; then $A\cup\{\infty\}$ is homeomorphic to the subset of $S^1$ consisting of the open semicircle of points with negative $x$-coordinate together with the single point $\langle 1,0\rangle$, which is clearly not compact.
If $A$ is compact, $A\cup\{\infty\}$ is just going to be $A$ together with an isolated point $\infty$ not in $A$. That’s also what you get when you construct $A^*$ for a compact $A$, and there is an obvious homeomorphism between them that fixes $A$ pointwise. (A map $h$ whose domain includes $A$ is said to fix $A$ pointwise if $h(x)=x$ for each $x\in A$.) This is not usually called a compactification of $A$, however, because $A$ is not dense in it.
The important case here is the one in which $A$ is closed in $X$ but not compact. You need to show two things.
- You need to show that $A\cup\{\infty\}$ is a compact subset of $X^*$, as otherwise it has no hope of being homeomorphic to $A^*$.
Let $\infty_A$ be the point at infinity in $A^*$. The only reasonable candidate for a homeomorphism between $A\cup\{\infty\}$ and $A^*$ is the map $h:A\cup\{\infty\}\to A^*$ such that $h(x)=x$ for $x\in A$, and $h(\infty)=\infty_A$, so you should try to show that this map is a homeomorphism. The key will be showing that relatively open nbhds of $\infty$ in the subspace $A\cup\{\infty\}$ of $X^*$ are precisely the sets $(A\cup\{\infty\})\setminus K$ such that $K$ is a compact subset of $A$.