You need to instantiate class A within class B then access the variable you declared. Bspeed = A.Aspeed;
This is a basic function of any programming language, and not to be discouraging but you won’t be able to do much in C++ without that basic knowledge. Try sticking to blueprints, which for you should not have any disadvantages compared to trying to do it in C++. There are many UE4 tutorials on YouTube.
Inside the .h for class be you will first need to add an include statement for Class A. Once you’ve done this you can create a variable inside Class B who’s type is of Class A (which would look like A MyClassARef). From this variable, as HuntaKiller mentioned, you can then get the specific atribute of class A that you need. In the case of your example it would be BSpeed = MyClassARef.ASpeed. For this to work, ASpeed needs to be declared public inside Class A so that another class can see/use it.