Okay - I get now that you talking about changing the ground. But still this princicple applies: the same transformation that you applied to the ground is the transformation that applies to the ball.
You rotated the plane. I don't know how you have accomplished that rotation in your program, but mathematically it is expressed as a matrix $M$ that satisfies $M^TM = I$, the identity matrix (where $M^T$ is the transpose of $M$). If $\bf n$ is the normal vector to the original plane, then $M\bf n$ is the normal vector to the rotated plane.
You also said you moved the plane (in the example, along the $x$-axis). This means that the new plane no longer passes through the origin (at least in your example, the original point did). This is a translation, but we need to be careful which translation we use. Suppose the new plane must pass through some point $\bf p$. In your example you indicated that it passes through $(\sim 0.5, 0, 0)$. You can use that to be the point $\bf p$. Since the normal vector is $M\bf n$ and it passed through $\bf p$, a point $\bf r$ is on the new plane if $$(M{\bf n})^T{\bf r} = {\bf n}^TM^T{\bf r} = d$$ where $d = {\bf n}^TM^T\bf p$. The translation vector we need is ${\bf b} = dM\bf n$, which is the closest point on the new plane to the origin.
So the tranformation to the original plane ${\bf n}^T{\bf r} = 0$ to get the new plane ${\bf n}^TM^T{\bf r} = d$ is to rotate by $M$, then add the translation vector $b$:
$$ {\bf r} \mapsto M{\bf r} + \bf b$$
(In case you don't know, $\mapsto$ means "maps to". I.e., the original value on the left is transformed into the value on the right.) This is the same transformation you need to apply to your sphere to get it's new location after the transformation. If $\bf c$ is the original center of the sphere, the transformed center will be $${\bf c} \mapsto M{\bf c} + \bf b$$
Let $\bf v$ be the "input direction vector" of the horizontal ball movement. Since $\bf v$ is a direction, not a point, it does not translate. So the new direction vector that the ball will travel up the sloped ground will be given by $${\bf v} \mapsto M\bf v$$
So the inputs you need to solve your problem are the rotation vector $M$, and a point $\bf p$ that the new plane passes through. If you have these, then you can use them to transform the ground plane, the sphere's position, and the direction of movement, all three.
Here's the way that I like to think about it: in $\Bbb R^3$, the dot product is used to give you information about the projection of one vector onto another and the cross product is used to give you information about the rejection of one vector from another.
Dot Product
If we have two vectors $\mathbf a$ and $\mathbf b$, what do we need to specify the projection $\operatorname{proj}_{\mathbf b}\mathbf a$? We need the same things we need to specify any vector: a magnitude (length) and a direction. Geometrically, we see that the magnitude of $\operatorname{proj}_{\mathbf b}\mathbf a$ is $\|\mathbf a\||\cos(\theta)|$ where $\|\mathbf a\|$ is the magnitude of $\mathbf a$ and $\theta$ is the angle between $\mathbf a$ and $\mathbf b$. The absolute value of the cosine is there so that the formula continues to work for obtuse angles (make sure you understand that this formula works for all angles between $0$ and $\pi$ radians).
But what about the direction? By definition, the direction of the projection will either be in the direction of $\mathbf b$ (acute angle) or in the direction of $-\mathbf b$ (obtuse angle). Then note that we don't really need to use a vector to encode this information -- that would be overkill. We could just use a sign ($+$ or $-$) to encode it. Let's say that we want our product to be positive when the angle $\theta$ is acute and negative when $\theta$ is obtuse. I.e.
$$\operatorname{proposed operation} = \begin{cases} \|\mathbf a\||\cos(\theta)|, & \theta \in \left[0, \frac{\pi}2\right] \\ -\|\mathbf a\||\cos(\theta)|, & \theta \in \left[\frac{\pi}2, \pi\right]\end{cases}$$
But here's the interesting thing, $\cos(\theta) = |\cos(\theta)|$ when $\theta\in\left[0, \dfrac{\pi}2\right]$ and $\cos(\theta) = -|\cos(\theta)|$ when $\theta\in\left[\dfrac{\pi}2, \pi\right]$. So we can just replace this piecewise defined formula with the simpler
$$\operatorname{proposed operation} = \|\mathbf a\|\cos(\theta)$$
So then, we should define the dot product as just
$$\mathbf a \cdot \mathbf b = \|\mathbf a\|\cos(\theta)$$ right? Actually, we get two very nice properties if we scale the right hand side (RHS) by the magnitude of $\mathbf b$:
$$\mathbf a \cdot \mathbf b = \|\mathbf a\|\|\mathbf b\|\cos(\theta)$$
we get that $\mathbf a\cdot \mathbf b = \mathbf b \cdot \mathbf a$ (easy to see from symmetry of the RHS) and we get that this product is bilinear. That may not make sense to you right now, but it is a very desirable property. And notice that that extra factor doesn't impede our ability to reconstruct the projection at all. In fact, you should confirm for yourself that
$$\operatorname{proj}_{\mathbf b}\mathbf a = (\mathbf a \cdot \hat {\mathbf b})\hat {\mathbf b}$$
where $\hat {\mathbf b} = \dfrac{\mathbf b}{\|\mathbf b\|}$.
Cross Product
The construction of the cross product is done very similarly, but the big difference is when we try to encode the directional information. Remember that the rejection of $\mathbf a$ from $\mathbf b$ will be orthogonal (perpendicular) to $\mathbf b$. But in $\Bbb R^3$, there are infinitely many directions orthogonal to $\mathbf b$. So we can't just encode this information in a single scalar -- we'll need the cross product to result in a vector quantity.
If we want any semblance of the symmetry of the dot product, we also can't have the cross product just point in the direction of the rejection because then the direction of $\mathbf a\times \mathbf b$ would have no real relationship to the direction of $\mathbf b \times \mathbf a$. Instead we need a way to encode the directions of both rejections together. Luckily three-dimensional space has a useful property: every plane (containing the origin) is orthogonal to a unique line (containing the origin). So then the clever idea is to construct a plane from $\operatorname{rej}_{\mathbf a}\mathbf b$ and $\operatorname{rej}_{\mathbf b}\mathbf a$ and then point the cross product in one of the two directions along the line orthogonal to that plane. Then we've gotten our choice of infinitely many directions down to just two choices (one of two directions along the line).
Then we just need some way to always make a consistent choice. The right hand rule is a (somewhat arbitrary) way to make such a choice.
One other thing to note (which you could try to prove) is that the plane spanned by $\operatorname{rej}_{\mathbf a}\mathbf b$ and $\operatorname{rej}_{\mathbf b}\mathbf a$ is exactly the same as the plane spanned by just $\mathbf a$ and $\mathbf b$. So when defining the direction of the cross product vector, it's easier to do so in terms of $\mathbf a$ and $\mathbf b$ directly.
Then we can recover the rejection $\operatorname{rej}_{\mathbf b}\mathbf a$ from the slightly more complicated formula (due to the cross product actually being orthogonal to the rejection rather than pointing in its direction):
$$\operatorname{rej}_{\mathbf b}\mathbf a = \hat{\mathbf b}\times(\mathbf a\times \hat{\mathbf b})$$
which you can find by first showing that
$$\mathbf a \times \mathbf b = \operatorname{rej}_{\mathbf b}\mathbf a \times \mathbf b$$
Past the Motivations
The above "constructions" are really just one way to motivate the definitions, but you could still ask why for example we use a scalar instead of a vector in defining the dot product. I hope I've convinced you that we don't need a vector, but there's nothing to suggest that we couldn't define it that way. The reason actually comes from the parts I glossed over about the properties that we want the dot and cross products to have. In particular, we want the dot and cross products to be invariant under certain transformations. You can wait until you actually get to linear algebra to learn about that, but the headline is that the dot product will only have the required invariance property if it's a scalar quantity rather than a vector quantity.
Wedge Product
When motivating the cross product, I used a property of three-dimensional space. This has a rather unfortunate consequence: the cross product (as a bilinear product from vectors to vectors) is only definable in three-dimensions (and weirdly in 7-dimensions, but we won't go into that construction here). But there actually is a way to generalize the cross product to something that works in any dimension so long as we're willing to give up the property that it should result in a vector. In fact, it can't result in a scalar either. If we introduce new objects called bivectors, then we can get a much more elegant and general product called the wedge product. It almost certainly won't be covered in your multivariable calculus course, or even in your future linear algebra course, but if you'd like to learn the very basics of it, I suggest reading through my answer here. At the bottom, I give a couple of references from which you can learn more.
Best Answer
$\vec{a}$ is a vector which you can represent as a line from (0,0) to the point (3,4). By Pythagoras the length of the line is 5. Joining any two points along that line will give you a vector in the same direction as $\vec{a}$.
You want a vector with magnitude 27, so you can just join (0,0) to the point 27/5*(3,4) i.e. to (81/5, 108/5).
Your vector would be $$ \frac{81}{5} \vec{i} + \frac{108}{5} \vec{j}. $$